[postgis-users] Stuck with PostgreSQL/PostGIS Upgrade
Birgit Laggner
birgit.laggner at thuenen.de
Wed Aug 14 03:27:40 PDT 2019
Dear Paul,
thank you very much for your helpful response! We will try the symlink and I will read your blog to learn more about the upgrade process. And yes, sorry for the limited information, but it was already quite difficult to get these snippets from our admin... :-)
With thankful regards,
Birgit
Von: "Paul Ramsey" <pramsey at cleverelephant.ca>
An: "PostGIS Users Discussion" <postgis-users at lists.osgeo.org>
Gesendet: Dienstag, 13. August 2019 17:46:42
Betreff: Re: [postgis-users] Stuck with PostgreSQL/PostGIS Upgrade
Some more background information about the magic gears turning behind the upgrade process:
[ http://blog.cleverelephant.ca/2016/08/postgis-upgrade.html | http://blog.cleverelephant.ca/2016/08/postgis-upgrade.html ]
P
On Aug 13, 2019, at 8:40 AM, Paul Ramsey < [ mailto:pramsey at cleverelephant.ca | pramsey at cleverelephant.ca ] > wrote:
B,
You haven’t included quite enough information to make a full diagnosis (like what command generates the error message) but just guessing, your admin used apt-get to update both postgres and postgis packages and then ran pg_upgrade on the cluster. Since the old postgis version is gone at this point (it’s been removed during the update) when the system catalog tries to make sense of postgis objects and references to old library, you get this error.
A hack to work around the issue is to find the location of postgis-2.5.so (the new library copy from the upgrade) and then create a symlink from the postgis-2.3.so to that file, so that the system will end up finding a library to load. The new and old libraries have mostly the same symbols, so this trick works fine for the purposes of upgrade.
You may run into yet further problems, but this is a quick way to try and move forward. Once you have the database up and running, do not forget to run ALTER 'EXTENSION postgis UDPATE’ on all your postgis databases. This re-installs all the SQL functions, pointing to the new library file. Once that’s done you can remove the symlink.
ATB,
P
PS, here’s a link to a blog post about working through this same issue, but on a Centos system. So it’s not command-perfect, but provides general explanations of problems that an admin might use to navigate the Ubuntu specific issues. [ https://info.crunchydata.com/blog/upgrading-postgis-on-centos-7 | https://info.crunchydata.com/blog/upgrading-postgis-on-centos-7 ]
BQ_BEGIN
On Aug 13, 2019, at 7:56 AM, Birgit Laggner < [ mailto:birgit.laggner at thuenen.de | birgit.laggner at thuenen.de ] > wrote:
Dear list,
on our test server, we currently try to test how to upgrade our PostgreSQL/PostGIS database. Sadly, we are stuck somewhere and would be very glad if anybody could help.
Our test server is running on an Ubuntu 16.04 system in a virtual machine. We are coming from PostgreSQL 9.5.17 with PostGIS 2.3.3 and want to upgrade to PostgreSQL 11.2 and PostGIS 2.5.
Here the outputs of the version queries:
SELECT version();
"PostgreSQL 9.5.17 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609, 64-bit"
SELECT postgis_full_version();
"POSTGIS="2.3.3 r15473" GEOS="3.5.1-CAPI-1.9.1 r4246" SFCGAL="1.2.2" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 1.11.3, released 2015/09/16" LIBXML="2.9.3" LIBJSON="0.11.99" TOPOLOGY RASTER"
Our admin tried to upgrade PostGIS first and swears he did as told in the PostGIS manual. But apparently, the upgrade was not fully successful, since PostgreSQL still seems to look for PostGIS 2.3.
His error message while trying to upgrade PostgreSQL is:
postgres at gis ERROR: could not access file "$libdir/postgis-2.3": No such file or directory.
Has anybody any idea what we are doing wrong and what we should be doing instead?
With hopeful regards,
Birgit
_______________________________________________
postgis-users mailing list
[ mailto:postgis-users at lists.osgeo.org | postgis-users at lists.osgeo.org ]
https://lists.osgeo.org/mailman/listinfo/postgis-users
BQ_END
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190814/5d0ae599/attachment.html>
More information about the postgis-users
mailing list