[postgis-users] Error Upgrading PostGIS 2.5.4 to 3.1.2

Nikhil Shetty nikhil.dba04 at gmail.com
Fri Apr 14 00:59:02 PDT 2023


Hi Team,

We are running on PostgreSQL v10.12 and we are in the process to upgrade it
to v13. We are using PostGIS v2.5.4 on v10.12.

We want to upgrade PostGIS as well to 3.1.2. We plan to follow below
approach

1. Upgrade PostGIS from 2.5.4 to 3.1.2 on PostgreSQL 10.12
2. Upgrade PostgreSQL 10.12 to 13

When performing step 1, we are getting below error

geo=# alter extension postgis update to '3.1.2';

WARNING:  unpackaging raster

WARNING:  PostGIS Raster functionality has been unpackaged

HINT:  type `SELECT postgis_extensions_upgrade();` to finish the upgrade.
After upgrading, if you want to drop raster, run: DROP EXTENSION
postgis_raster;

ERROR:  could not access file "$libdir/postgis-2.5": No such file or
directory

CONTEXT:  PL/pgSQL function _postgis_drop_function_if_needed(text,text)
line 6 at FOR over SELECT rows


geo=# SELECT postgis_extensions_upgrade();

WARNING:  unpackaging raster

WARNING:  PostGIS Raster functionality has been unpackaged

HINT:  type `SELECT postgis_extensions_upgrade();` to finish the upgrade.
After upgrading, if you want to drop raster, run: DROP EXTENSION
postgis_raster;

ERROR:  could not access file "$libdir/postgis-2.5": No such file or
directory

CONTEXT:  PL/pgSQL function _postgis_drop_function_if_needed(text,text)
line 6 at FOR over SELECT rows

SQL statement "ALTER EXTENSION postgis UPDATE TO "3.1.2";"

PL/pgSQL function postgis_extensions_upgrade() line 22 at EXECUTE




We removed the old 2.5.4 packages and installed 3.1.2


ls -l /usr/pgsql-10/lib | grep postgis

-rwxr-xr-x 1 root root 1047128 Jun 29  2021 *postgis*-3.so

-rwxr-xr-x 1 root root  850416 Jun 29  2021 *postgis*_raster-3.so

-rwxr-xr-x 1 root root  435656 Jun 29  2021 *postgis*_sfcgal-3.so

-rwxr-xr-x 1 root root  565008 Jun 29  2021 *postgis*_topology-3.so
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20230414/fdd18770/attachment.htm>


More information about the postgis-users mailing list