[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] Upgrading PostGIS
From:       Clifford Snow <clifford () snowandsnow ! us>
Date:       2020-12-21 17:59:13
Message-ID: CADAoPLppUttQtYZgiv7Q9njBs5H-NtXiDBN8YJMSAiBJe8g-sA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>


-- 
@osm_washington
www.snowandsnow.us
OpenStreetMap: Maps with a human touch

[Attachment #5 (text/html)]

<div dir="ltr">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.  <div><br></div><div>I didn&#39;t \
mention this in my original email but one of my databases has nealy 100M records. I \
didn&#39;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.  </div><div><br></div><div>Thanks \
again,</div><div>Clifford</div><div><br></div></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Thu, Dec 17, 2020 at 11:45 PM Tomas Straupis &lt;<a \
href="mailto:tomasstraupis@gmail.com">tomasstraupis@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2020-12-17, kt, 22:46 \
Clifford Snow rašė:<br> &gt; I want to upgrade Postgresql from 11 to 13 and PostGIS \
from 2.5 to 3.1 on a Fedora Workstation. Is it possible?<br> <br>
   If I understand you correctly, you&#39;re using both postgresql and<br>
postgis packages from fedora repos?<br>
   If so, these are my notes, I use Fedora:<br>
   I&#39;ve found it impossible to upgrade using only core packages,<br>
because if both postgre and postgis versions change, upgraded system<br>
is unusable (db upgrade fails), because you have to upgrade postgresql<br>
and during upgrade it needs access to both new and OLD versions of<br>
postgis libraries, and old libraries have to be compiled using all old<br>
libraries used in old postgresql. Therefore several years ago I<br>
switched to using core postgresql but postgis compiled from source.<br>
   Now my notes on upgrading are:<br>
   1. BEFORE upgrading postgresql upgrade postgis to whatever newest<br>
version of postgis you want to use.<br>
   2. Make a copy of postgis/SFCGAL etc. libraries (.so files), for<br>
example everything from /usr/lib64/pgsql<br>
   3. vacuumdb -a -f -v<br>
   4. pg_dump (just to be on the safe side, but not mandatory)<br>
   5. Upgrade Fedora (and postgresql with it).<br>
   6. Copy the files you copied in step 2 to<br>
/usr/lib64/pgsql/postgres-XX/lib where XX - old version of postgresql<br>
you were upgrading from.<br>
   7. Compile postgis for the new upgraded postgresql<br>
   8. Upgrade the database<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a><br> <a \
href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" \
target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br> \
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" \
class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div>@osm_washington<br></div><div><a href="https://www.snowandsnow.us" \
target="_blank">www.snowandsnow.us</a></div><div>OpenStreetMap: Maps with a human \
touch</div></div></div></div></div></div></div>



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic