[postgis-users] [postgis-devel] Upgrade PostGIS from 2.5.4 to 3.1.2

Regina Obe lr at pcorp.us
Mon Jan 24 11:15:22 PST 2022


Sorry had typo

 

SELECT postgis_extensions_upgrade();

 

(I had in there update() that should be above)

 

From: Regina Obe [mailto:lr at pcorp.us] 
Sent: Monday, January 24, 2022 2:07 PM
To: 'PostGIS Development Discussion' <postgis-devel at lists.osgeo.org>; 'postgis-users at lists.osgeo.org' <postgis-users at lists.osgeo.org>
Subject: RE: [postgis-devel] Upgrade PostGIS from 2.5.4 to 3.1.2

 

I think I ran into this issue too though I was doing a pg_upgrade from 9.6 to 11 at the same time.

 

The issue is since both ship and overlapping set of files, they can’t cleanly coexist.

 

The below should work.

 

Uninstall postgis25_11 package

 

Install the postgis31_11 package

 

Symlink the old names to the new libraries

 

ln -s /usr/pgsql-11/lib/postgis-3.so /usr/pgsql-11/lib/postgis-2.5.so

ln -s /usr/pgsql-11/lib/postgis_raster-3.so  /usr/pgsql-11/lib/rtpostgis-2.5.so

 

#if you are not using these libraries, you can skip this step

ln -s /usr/pgsql-11/lib/postgis_topology-3.so /usr/pgsql-11/lib/postgis_topology-2.5.so

 

ln -s /usr/pgsql-11/lib/address_standardizer-3.so /usr/pgsql-11/lib/address_standardizer-2.5.so

ln -s /usr/pgsql-11/lib/address_standardizer-3.so /usr/pgsql-11/lib/address_standardizer.so

 

 

#On your databases

 

SELECT postgis_full_version();

 

Should show something to the effect you have 2.5 scripts but are running postgis-3

 

ALTER EXTENSION postgis UPDATE;

SELECT postgis_extensions_upgrade();

SELECT postgis_extensions_update();

 

-- if not using raster, you can do this

DROP EXTENSION postgis_raster;

 

 

#after you are done upgrading your dbs, you can drop the symlinks e.g.

rm /usr/pgsql-11/lib/rtpostgis-2.5.so

rm /usr/pgsql-11/lib/postgis-2.5.so

rm /usr/pgsql-11/lib/postgis_topology-2.5.so

 

From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Nikhil Shetty
Sent: Monday, January 24, 2022 1:48 PM
To: PostGIS Development Discussion <postgis-devel at lists.osgeo.org <mailto:postgis-devel at lists.osgeo.org> >; postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org> 
Subject: [postgis-devel] Upgrade PostGIS from 2.5.4 to 3.1.2

 

Hi Team,

 

I am looking for a way to upgrade postgis on postgresql 11 from 2.5.4 to 3.1.2

I am getting below error when doing though yum

 

Transaction check error:
  file /usr/pgsql-11/share/extension/address_standardizer.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64
  file /usr/pgsql-11/share/extension/address_standardizer.sql from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64
  file /usr/pgsql-11/share/extension/address_standardizer_data_us.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64
  file /usr/pgsql-11/share/extension/postgis.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64
  file /usr/pgsql-11/share/extension/postgis_sfcgal.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64
  file /usr/pgsql-11/share/extension/postgis_tiger_geocoder.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64
  file /usr/pgsql-11/share/extension/postgis_topology.control from install of postgis31_11-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-2.5.4-1.rhel7.x86_64
  file /usr/pgsql-11/bin/pgsql2shp from install of postgis31_11-client-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-client-2.5.4-1.rhel7.x86_64
  file /usr/pgsql-11/bin/raster2pgsql from install of postgis31_11-client-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-client-2.5.4-1.rhel7.x86_64
  file /usr/pgsql-11/bin/shp2pgsql from install of postgis31_11-client-3.1.2-1.rhel7.x86_64 conflicts with file from package postgis25_11-client-2.5.4-1.rhel7.x86_64

 

I have seen the document for 'Hard Upgrade' but that is unfortunately a long route to take for critical databases.

 

Postgresql Version - 11.7

OS - RHEL 7.9

 

Full Version Details - 

PostgreSQL 11.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit POSTGIS="2.5.4" [EXTENSION] PGSQL="110" GEOS="3.8.1-CAPI-1.13.3" PROJ="Rel. 7.0.0, March 1st, 2020" GDA

L="GDAL 3.0.4, released 2020/01/28" LIBXML="2.9.1" LIBJSON="0.11" LIBPROTOBUF="1.0.2" RASTER

Thanks and Regards,

Nikhil

 

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


More information about the postgis-users mailing list