[postgis-users] Upgrade PostGIS from 2.5.4 to 3.1.2
Nahum Castro
nahumcastro at gmail.com
Mon Jan 24 20:51:58 PST 2022
Before anything, please backup your database with pg_dumpall, it backups
all databases, users, everything.
https://www.postgresql.org/docs/11/app-pg-dumpall.html
Next I have done this in the past.
$pg_dump yourdatabase > yourdatabase.sql
$createdb yournewdatabase
$psql yournewdatabase
#create extension postgis;
#create extension postgis_topology;
#etc, etc,. all your extensions
#\i /path/to/yourdatabase.sql
#select postgis_full_version();
If it asks for an update do as described here.
http://postgis.net/docs/manual-3.1/postgis_administration.html#soft_upgrade
If everything is OK, drop the old database and rename yournewdatabase with
the old name.
If there are conflicts with rpm uninstall postgis 2.5 and then install
postgis 3
search with rpm -qa | grep postgis
#yum remove postgisxxx
*Don't forget to backup everything!*
Hope it helps.
Nahum.
El lun, 24 ene 2022 a la(s) 13:06, Nikhil Shetty (nikhil.dba04 at gmail.com)
escribió:
> Hi Team,
>
> I am looking for a faster 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 a critical database.
>
> 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" GDAL="GDAL
> 3.0.4, released 2020/01/28" LIBXML="2.9.1" LIBJSON="0.11"
> LIBPROTOBUF="1.0.2" RASTER
>
>
> Thanks and Regards,
> Nikhil
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
--
*Nahum Castro González*
Blvd. Perdigón 214, Brisas del Lago.
CP 37207
León, Guanajuato, México
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20220124/2dcb229d/attachment.html>
More information about the postgis-users
mailing list