Options to rollback PostGIS upgrade
Regina Obe
lr at pcorp.us
Mon Feb 26 08:47:27 PST 2024
Correct. Well that is the safest way cause we don’t support downgrades.
In theory if you just ran with the older binaries with newer scripts, what you’d have is all the new functions added between 3.1 and 3.3 broken.
You could then just manually run the 3.1 script, but you’d need to hack the version checks in postgis_extensions_upgrade().
From: Nikhil Shetty <nikhil.dba04 at gmail.com>
Sent: Monday, February 26, 2024 11:20 AM
To: Regina Obe <lr at pcorp.us>
Cc: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Subject: Re: Options to rollback PostGIS upgrade
Hi Regina,
We are upgrading from 3.1.2 to 3.3.3.
So, after we run below command the only option to rollback to previous PostGIS version is to install old binaries and restore data from backup?
SELECT postgis_extensions_upgrade();
Thanks,
Nikhil
On Mon, 26 Feb 2024 at 20:23, Regina Obe <lr at pcorp.us <mailto:lr at pcorp.us> > wrote:
Which version of PostGIS are you coming from again?
In theory, as long as your old is running a newish PostGIS 3+, it should be safe enough to just NOT run
SELECT postgis_extensions_upgrade();
If you don’t run that, then your database is just running with a newer lib file, but old scripts. So then just installing the binaries of older should work fine.
One caveat, I believe we did make sure changes that caused some functions not to work, but I can’t remember what those were.
All I know is if you run
SELECT postgis_full_version();
And you get an error after upgrading your binaries, then not running postgis_extensions_ugprade is not an option.
From: Nikhil Shetty <nikhil.dba04 at gmail.com <mailto:nikhil.dba04 at gmail.com> >
Sent: Monday, February 26, 2024 3:30 AM
To: PostGIS Users Discussion <postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org> >
Subject: Options to rollback PostGIS upgrade
Hi Team,
We are looking at options available to rollback a PostGIS upgrade in case there are issues after the upgrade.
Apart from removing new packages and installing old ones and then restoring the database from backup , do we have any other option?
Thanks,
Nikhil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20240226/0f32c2e2/attachment.htm>
More information about the postgis-users
mailing list