[postgis-users] Upgrading PostGIS

Clifford Snow clifford at snowandsnow.us
Mon Dec 21 09:59:13 PST 2020


Thanks for all the suggestions. I decided to take the safe route by running
pg_dumpall then turning on Postgresql 13 with Postgis 3.1.  Once the data
was loaded the system was working perfectly.

I didn't mention this in my original email but one of my databases has
nealy 100M records. I didn't want to have to recreate it if I screwed up
the pg_upgrade path. pg_dumpall and reloading took a while but the end
result is a nice new postgresql server with the latest PostGIS.

Thanks again,
Clifford


On Thu, Dec 17, 2020 at 11:45 PM Tomas Straupis <tomasstraupis at gmail.com>
wrote:

> 2020-12-17, kt, 22:46 Clifford Snow rašė:
> > I want to upgrade Postgresql from 11 to 13 and PostGIS from 2.5 to 3.1
> on a Fedora Workstation. Is it possible?
>
>   If I understand you correctly, you're using both postgresql and
> postgis packages from fedora repos?
>   If so, these are my notes, I use Fedora:
>   I've found it impossible to upgrade using only core packages,
> because if both postgre and postgis versions change, upgraded system
> is unusable (db upgrade fails), because you have to upgrade postgresql
> and during upgrade it needs access to both new and OLD versions of
> postgis libraries, and old libraries have to be compiled using all old
> libraries used in old postgresql. Therefore several years ago I
> switched to using core postgresql but postgis compiled from source.
>   Now my notes on upgrading are:
>   1. BEFORE upgrading postgresql upgrade postgis to whatever newest
> version of postgis you want to use.
>   2. Make a copy of postgis/SFCGAL etc. libraries (.so files), for
> example everything from /usr/lib64/pgsql
>   3. vacuumdb -a -f -v
>   4. pg_dump (just to be on the safe side, but not mandatory)
>   5. Upgrade Fedora (and postgresql with it).
>   6. Copy the files you copied in step 2 to
> /usr/lib64/pgsql/postgres-XX/lib where XX - old version of postgresql
> you were upgrading from.
>   7. Compile postgis for the new upgraded postgresql
>   8. Upgrade the database
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>


-- 
@osm_washington
www.snowandsnow.us
OpenStreetMap: Maps with a human touch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20201221/0b83f03a/attachment.html>


More information about the postgis-users mailing list