[postgis-devel] Upgrade PostGIS from 2.5.4 to 3.1.2

Regina Obe lr at pcorp.us
Tue Feb 1 13:13:56 PST 2022


Do you get error after if you do:

 

ALTER EXTENSION postgis UPDATE;

SELECT postgis_extensions_upgrade();

 

 

Or

 

SELECT postgis_extensions_upgrade();

SELECT postgis_extensions_upgrade();

 

 

2.5 on PostgreSQL 13 is not a place you want to stay even if you are running with 3.0 libraries.  

You really want to be on PostGIS 3.0 or higher with both the libs and the database updated.

 

The reason being that 2.5 has postgis/raster in one extension and upgrading after will become very difficult.

 

 

 

From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Nikhil Shetty
Sent: Saturday, January 29, 2022 12:50 AM
To: PostGIS Development Discussion <postgis-devel at lists.osgeo.org>
Subject: Re: [postgis-devel] Upgrade PostGIS from 2.5.4 to 3.1.2

 

Hi Team,

 

We have found another method that will help to upgrade both postgresql from 11 to 13 and postgis from 2.5.4 to 3.1.2.

 

Error:

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

Resolution: Create a symlink

cd /usr/pgsql-13/lib
1) ln -s  <http://rtpostgis-2.4.so/> postgis-3.so  <http://rtpostgis-2.3.so/> postgis-2.5.so

Once symlink is created proceed with pg_upgrade and it is successful. I wanted to confirm whether this is the right way to go? 

Note: We are not changing the symlink after pg_upgrade.

 

Thanks,

Nikhil

 

 

 

 

On Fri, Jan 28, 2022 at 5:44 PM Sandro Santilli <strk at kbt.io <mailto:strk at kbt.io> > wrote:

On Fri, Jan 28, 2022 at 12:40:31AM -0500, Regina Obe wrote:

> Sandro,
> 
> Can you remind me, I think you figured out a way around the raster
> unpackaged issue so it works in PG 13 too so it should be possible for
> someone to go straight from say PG 9.x 2.4 to PG 13 3.x

I'm not sure what you're referring to.
The `CREATE FROM UNPACKAGED` syntax was removed from
postgis_extensions_upgrade()
in commit 520af0e8d1bb6e9544d974713bb87e428ff4230b
which seems to be both in 3.1 and 3.2 branches,
not sure it landed in 3.0 (there's no notice of it in the NEWS file)

--strk;
_______________________________________________
postgis-devel mailing list
postgis-devel at lists.osgeo.org <mailto:postgis-devel at lists.osgeo.org> 
https://lists.osgeo.org/mailman/listinfo/postgis-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20220201/71c543b5/attachment.html>


More information about the postgis-devel mailing list