[postgis-tickets] [PostGIS] #4460: Problems migrating Postgis 2.1 to 2.4
PostGIS
trac at osgeo.org
Sat Aug 10 20:36:49 PDT 2019
#4460: Problems migrating Postgis 2.1 to 2.4
-------------------------+---------------------------
Reporter: davidperez | Owner: pramsey
Type: defect | Status: closed
Priority: high | Milestone: PostGIS 2.4.8
Component: postgis | Version: 2.4.x
Resolution: wontfix | Keywords:
-------------------------+---------------------------
Changes (by robe):
* status: new => closed
* resolution: => wontfix
Comment:
The warning about postgis.backend is harmless -it happens because both
postgis-2.1 and postgis-2.4.so are live at same time and conflicting. It
can be ignored.
My suggestion is not try to compile 2.4 for PostgreSQL 9.3.
I've done a similar migration on CentOS going from 9.3 2.1 -> 11 2.5 and
9.2->9.6
Details of my steps here:
https://www.bostongis.com/blog/index.php?/archives/273-Using-pg_upgrade-
to-upgrade-PostgreSQL-9.3-PostGIS-2.1-to-PostgreSQL-11-2.5-on-Yum.html
The basic idea is you
1) Install the new cluster PostgreSQL 11 with new PostGIS 2.5
2) you symlink the postgis-2.5 -> postgis-2.1 in new cluster
3) Since you are running 2.1, you need to first drop the functions in your
old cluster since the backing functions were removed in 2.2
{{{
ALTER EXTENSION postgis DROP FUNCTION GeomFromEWKB(bytea);
DROP FUNCTION GeomFromEWKB(bytea);
ALTER EXTENSION postgis DROP FUNCTION ST_GeomFromEWKB(bytea);
DROP FUNCTION ST_GeomFromEWKB(bytea);
}}}
4) Do your pg_upgrade as usual
5) Then on new cluster after pg_upgrade do the
{{{
ALTER EXTENSION postgis UPDATE;
}}}
The reason why installing the newer PostGIS in your old cluster and then
pg_upgrading didn't work is because brin was introduced in 9.4, and the
2.5 you installed therefore lackaged those when installed in 9.3 and since
you were already at 2.5 by the time you pg upgraded, it didn't do
anything.
Anyway I think we had fixed this issue already in 2.5 and we can't really
backport it to 2.4 because as I recall it was a bit involved.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4460#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list