[postgis-users] PostGIS problem after updating from 3.1.4 to 3.2.0

Regina Obe lr at pcorp.us
Mon Jan 10 19:20:48 PST 2022

Hmm okay it looks like I forgot to take off the minor version in my release so all the libs


Have -3.2 on them instead of -3.  I guess I didn’t notice cause I usually just install the new version over the old.

And then run 


SELECT postgis_extensions_upgrade();


Though I’m still surprised it’s giving an error as I thought we fixed that issue a long time ago to handle a case where the lib file has been removed.

So that seems like a reemerging old bug.


That said , while I’m making a new package.  Can you do the following:


First try if:

-- works without doing anything else

SELECT postgis_extensions_upgrade();


If the above still gives you an error, do the following 


Reinstall PostGIS 3.1.4

Reinstall PostGIS 3.2.0

Then run


SELECT postgis_extensions_upgrade();


In each of your databases.




From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Calle Hedberg
Sent: Monday, January 10, 2022 9:53 PM
To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Subject: [postgis-users] PostGIS problem after updating from 3.1.4 to 3.2.0




I just updated postgresql 13 and pg 14 (running on the D-drive under Windows 10 64 bits) from 3.14 to 3.2.0. (in order to install 3.2, I had to first remove 3.1.4 - then I installed 3.2.0 using Stackbuilder run as administrator).


When running "create extension postgis;" in pgAdmin, I get as expected a message that extension postgis already exists. But it actually does not exist/start up - if I run e.g. "select postgis_full_version();", it returns

ERROR: could not access file "$libdir/postgis-3": No such file or directory CONTEXT: SQL statement "SELECT public.postgis_lib_version()" PL/pgSQL function postgis_full_version() line 26 at SQL statement SQL state: 58P01


If I run "ALTER EXTENSION postgis  UPDATE TO "3.2.0"; "  I get a similar message:

ERROR: could not access file "$libdir/postgis-3": No such file or directory CONTEXT: PL/pgSQL function _postgis_drop_function_if_needed(text,text) line 6 at FOR over SELECT rows SQL state: 58P01


I can force the issue by dropping the postgis extension and recreate it, but then I have to use drop extension postgis cascade and that command will wipe out the geometry fields in the database (dropping ext postgis on the template postgres db work fine, but that db does not have any geometry fields).


I have tried to re-start pg, reboot the machine, and googling the issue, to no avail.


I can see that postgis 3.2.0 has been installed:

D:\Program Files\PostgreSQL\13\share\contrib\postgis-3.2


I see the error message states it cannot find postgis-3  - but there IS no such file or directory, as you can see the directory is actually called postgis-3.2 . But I don't know if that's a bug or what...


Any suggestions - or will I have to dump all my databases and then re-install pg 13 and pg14 afresh?


Best regards



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20220110/fee23c1a/attachment.html>

More information about the postgis-users mailing list