Update PostGIS GEOS library on RDS

0

I recently upgraded the PostGIS extension on my Postgres RDS instance. The upgrade went well, but the GEOS library is still on an old version. This means that some of the newer features are not available (e.g. ST_ReducePrecision).

Output of SELECT postgis_full_version();

POSTGIS="3.1.4 ded6c34" [EXTENSION] PGSQL="120" GEOS="3.8.2-CAPI-1.13.4" PROJ="6.2.1" GDAL="GDAL 2.3.1, released 2018/06/22" LIBXML="2.9.9" LIBJSON="0.12.99" LIBPROTOBUF="1.3.0" WAGYU="0.5.0 (Internal)" TOPOLOGY RASTER

Error message when using one of the newer features:

ERROR: Precision reduction requires GEOS-3.9 or higher

Is there a way to update the GEOS library?

johandk
asked 2 years ago553 views
1 Answer
0

Hi,

Are you sure you're running RDS Postgres and not Aurora Postgres? Based on the postgis_full_version I can't tell which engine or version you're using but RDS Postgres 13.5 has the following GEOS version available.

postgres=> select version(),postgis_full_version();
                                                 version                                                 |                                        postgis_full_version
---------------------------------------------------------------------------------------------------------+---------------------------------------------
 PostgreSQL 13.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11), 64-bit | POSTGIS="3.1.4 ded6c34" [EXTENSION] PGSQL="130" GEOS="3.9.1-CAPI-1.14.2" PROJ="Rel. 5.2.0, September 15th, 2018" LIBXML="2.9.1" LIBJSON="0.13.1" LIBPROTOBUF="1.3.2" WAGYU="0.5.0 (Internal)"
(1 row)

Aurora Postgres 13.4 has the following GEOS version.

postgres=> select aurora_version(), version(), postgis_full_version();
 aurora_version |                                             version                                             |                                                                          p
ostgis_full_version
----------------+-------------------------------------------------------------------------------------------------+-----------------------------------
 13.4.0         | PostgreSQL 13.4 on x86_64-pc-linux-gnu, compiled by x86_64-pc-linux-gnu-gcc (GCC) 7.4.0, 64-bit | POSTGIS="3.1.4 ded6c34" [EXTENSION] PGSQL="130" GEOS="3.9.1dev-CAPI-1.14.1
" PROJ="6.2.1" LIBXML="2.9.9" LIBJSON="0.12.99" LIBPROTOBUF="1.3.0" WAGYU="0.5.0 (Internal)"
(1 row)

I'd recommend testing your postgis query on a test copy of one of these versions and if appropriate you could perform an engine version upgrade to pickup the required GEOS/postgis version.

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions