Thanks, Regina!  I am running PostgeSQL 12 now!

However, when I ran *SELECT*PostGIS_Extensions_Upgrade(); the second time, I have the following msg.


NOTICE: Extension postgis_sfcgal is not available or not packagable for some reason

NOTICE: Packaging extension postgis_raster

WARNING: 'postgis.gdal_datapath' is already set and cannot be changed until you reconnect

WARNING: 'postgis.gdal_enabled_drivers' is already set and cannot be changed until you reconnect

WARNING: 'postgis.enable_outdb_rasters' is already set and cannot be changed until you reconnect


ERROR: function public.st_srid(geometry) does not exist

LINE 1: ..._makeemptyraster($1, $2, $3, $4, $5, -($5), 0, 0, public.ST_... ^

HINT: No function matches the given name and argument types. You might need to add explicit type casts.

QUERY: SELECT public.ST_makeemptyraster($1, $2, $3, $4, $5, -($5), 0, 0, public.ST_SRID('POINT(0 0)'::geometry))

CONTEXT: SQL statement "CREATE EXTENSION postgis_raster FROM unpackaged"

PL/pgSQL function postgis_extensions_upgrade() line 48 at EXECUTE

SQL state: 42883


On 12/22/19 8:09 PM, Regina Obe wrote:

NO NO  don’t do that.  Those set of libraries aren’t compatible with each other.

The PostGIS 3.0 and 2.5 from 12 are compatible with each other however.

So

What you want to do is

cp /usr/lib/postgresql/12/lib/postgis-3.so /usr/lib/postgresql/12/lib/postgis-2.5.so

cp /usr/lib/postgresql/12/lib/postgis_raster-3.so /usr/lib/postgresql/12/lib/rtpostgis-2.5.so

cp /usr/lib/postgresql/12/lib/postgis_topology-3.so /usr/lib/postgresql/12/lib/postgis_topology-2.5.so

Then after the upgrade in each of your databases run:

*SELECT*PostGIS_Extensions_Upgrade();

And then run it again to rebundle the raster into it’s own extension

*SELECT*PostGIS_Extensions_Upgrade();

Then if you don’t need raster, you can

DROP EXTENSION postgis_raster;

Once you are done upgrading your databases, you can delete thr *-2.5.so files you created in the 12 cluster.

*From:*postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] *On Behalf Of *Bo Guo
*Sent:* Sunday, December 22, 2019 10:01 PM
*To:* postgis-users@lists.osgeo.org
*Subject:* Re: [postgis-users] PostgreSQL 12 and PostGIS

Thanks, Regina,

I copied the three 2.5 lib files from/usr/lib/postgresql/11/lib to /usr/lib/postgresql/12/lib:

guob@yuma:/usr/lib/postgresql/12/lib$ ls -al *post*
-rw-r--r-- 1 root root  456832 Dec 22 19:49 postgis-2.5.so
-rw-r--r-- 1 root root 1351536 Oct 28 21:24 postgis-3.so
-rw-r--r-- 1 root root  847424 Oct 28 21:24 postgis_raster-3.so
-rw-r--r-- 1 root root  364224 Dec 22 19:49 postgis_topology-2.5.so
-rw-r--r-- 1 root root  569152 Oct 28 21:24 postgis_topology-3.so
-rw-r--r-- 1 root root  100264 Nov 12 03:33 postgres_fdw.so
-rw-r--r-- 1 root root  399136 Dec 22 19:50 rtpostgis-2.5.so

However, the three lib files are still in the loadable_libraries.txt file.

Bo

On 12/22/19 7:42 PM, Regina Obe wrote:

    Bo,

    Do you have the postgis-2.5.so, rtpostgis-2.5.so, postgis_topology-2.5.so

    files in

    /usr/lib/postgresql/11/lib

    And

    /usr/lib/postgresql/12/lib

    Those are the files it's complaining about.

    From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf

    Of Bo Guo

    Sent: Sunday, December 22, 2019 9:16 PM

    To:postgis-users@lists.osgeo.org  <mailto:postgis-users@lists.osgeo.org>

    Subject: Re: [postgis-users] PostgreSQL 12 and PostGIS

    Regina and Stefan,

    I might have run into a similar issues today as I was  trying to upgrade

    PostgreSQL 11 w/ PostGIS 2.5 to PostgreSQL 12 w/ PostGIS 3.0.

    The pg_upgradecluster command (sudo pg_upgradecluster -m upgrade 11 main)

    failed its check for the following required libraries:

         could not load library "$libdir/postgis-2.5": ERROR:  could not access

    file "$libdir/postgis-2.5": No such file or directory

         could not load library "$libdir/rtpostgis-2.5": ERROR:  could not 
access

    file "$libdir/rtpostgis-2.5": No such file or directory

         could not load library "$libdir/postgis_topology-2.5": ERROR:  could 
not

    access file "$libdir/postgis_topology-2.5": No such file or directory

    I have postgis-2.5 in the /usr/share/postgresql/11/contrib/ folder AND

    /usr/share/postgresql/12/contrib/ folder.  I also have postgis-3.0 under

    /usr/share/postgresql/12/contrib/.

    Thanks for your help!

    Bo

    Gistic Research, Inc.

    On 10/4/19 8:16 AM, Regina Obe wrote:

    Stefan,

    Which distro do you get your PostgreSQL 12 from.  I’m assuming

    apt.postgresql.org

    If so you should report on their mailing list, as that would be a packaging

    bug,not a PostGIS one and no one on the PostGIS project is on the apt team.

    https://www.postgresql.org/list/pgsql-pkg-debian/

    Thanks,

    Regina

    From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf

    Of Stefan Wolf

    Sent: Friday, October 4, 2019 6:19 AM

    To:postgis-users@lists.osgeo.org  <mailto:postgis-users@lists.osgeo.org>

    Subject: [postgis-users] PostgreSQL 12 and PostGIS

    Today I’ve installed the brand new PostgreSQL 12  on Ubuntu 18.04

    “apt-get install postgis”  will install PostGIS 2.5.2, but the  PATH is

    wrong:  /usr/share/postgresql/11/…

    So CREATE EXTENSION postgis will fail.

    Greetings from Berlin

    -Stefan Wolf-

    _______________________________________________

    postgis-users mailing list

    postgis-users@lists.osgeo.org  <mailto:postgis-users@lists.osgeo.org>

    https://lists.osgeo.org/mailman/listinfo/postgis-users

    _______________________________________________

    postgis-users mailing list

    postgis-users@lists.osgeo.org  <mailto:postgis-users@lists.osgeo.org>

    https://lists.osgeo.org/mailman/listinfo/postgis-users

--
Regards,
Bo Guo, PhD, PE
President
Gistic Research, Inc.
2033 E Warner Rd Ste 105
Tempe, AZ 85284
www.gisticinc.com  <http://www.gisticinc.com>
www.youtube.com/linearbench  <http://www.youtube.com/linearbench>
Office: 480-656-9962
Cell: 602-570-4697

_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

--
Regards,

Bo Guo, PhD, PE
President
Gistic Research, Inc.
2033 E Warner Rd Ste 105
Tempe, AZ 85284
www.gisticinc.com
www.youtube.com/linearbench
Office: 480-656-9962
Cell: 602-570-4697

_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to