[postgis-users] Help with PostGIS upgrade

Pierre Bails bails at getredbird.com
Tue Jul 26 01:05:07 PDT 2016


Hi,

This works for us on Debian Jessie. It should also work on Ubuntu.

# install laster version of postgres & postgis
$ sudo apt-get install postgresql-9.5 postgresql-9.5-postgis-2.2
postgresql-9.5-postgis-2.2-scripts postgresql-client-9.5
postgresql-contrib-9.5

# stop and drop the cluster 9.5 (if exists)
$ sudo pg_dropcluster 9.5 main --stop

# Upgrade the 9.3 cluster to the latest version. (very long, depending of
datasize)
$ sudo pg_upgradecluster 9.3 main

# check the cluster list
$ pg_lsclusters
Ver Cluster Port Status Owner    Data directory               Log file
9.3 main    5433 down   postgres /var/lib/postgresql/9.3/main
/var/log/postgresql/postgresql-9.3-main.log
9.5 main    5432 online postgres /var/lib/postgresql/9.5/main
/var/log/postgresql/postgresql-9.5-main.log

# after works fine, drop the old cluster
$ sudo pg_dropcluster 9.3 main

# then, remove old packages

Good luke !

Pierre


Le lun. 25 juil. 2016 à 23:37, Andy Colson <andy at squeakycode.net> a écrit :

> On 7/25/2016 3:49 PM, Karthick Thanigaimani wrote:
> > Hi,
> >
> >
> >
> > We have a database that is of ~1 TB and the schemas are big as well. We
> > would like to upgrade the database version from PostgreSQL 9.3.x to
> > 9.5.x and the DB has PostGIS 2.1.2 which also need to be updated to
> > 2.2.2 as per version 9.5.x.
> > I installed the postGIS 2.2.2 libraries and tried updating the version
> > 2.2.2 but it says there is no upgrade path.
> > and when we run the pg_upgrade compatibility check it says postGIS has
> > to be upgraded.
> >
> >
> > Is there anyway to achieve the upgrade without doing pg_dump of the
> > schemas.?
> >
> > Please can anyone help.
> >
> > thank you.
> >
> > Regards,
> > Karthick
>
> I just did this actually.  I first upgraded my PG9.3 to Postgis 2.2.2,
> then I used pg_upgrade to go from 9.3 to 9.5, which worked fine.
>
> Sounds like you had problems in PG9.3 upgrading Postgis.  That should
> work ok.
>
> Really, though, if should not matter which you upgrade first.  Can you
> install PostGIS 2.1.2 into PG 9.5?  If so, do that and upgrade PG first.
>   It should work ok.
>
> -Andy
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160726/4f651d89/attachment.html>


More information about the postgis-users mailing list