[postgis-users] How to migrate to new server when PostGIS generations differ

Christophe Pettus xof at thebuild.com
Sun Nov 12 08:26:02 PST 2023



> On Nov 12, 2023, at 08:11, Troels Arvin via postgis-users <postgis-users at lists.osgeo.org> wrote:
> Is my pg_dump->pg_restore plan simply not viable? If not, what other strategy should I employ?

PostGIS versions have specific PostgreSQL version requirements; the matrix is here:

	https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS

You usually have to follow a process of first, upgrading PostGIS to the highest version that your current version of PostgreSQL supports, then upgrading PostgreSQL to the highest version that supports that particular version of PostGIS, and repeating the cycle until you reach the PostgreSQL / PostGIS combination you want.

I believe (but can't confirm) that PostgreSQL version 10 supports PostGIS 2.5, so the process would be:

* Upgrade to PostGIS 2.5
* Upgrade to PostgreSQL 12
* Upgrade to PostGIS 3.4
* Upgrade to PostgreSQL 15

Note that each upgrade can have special sub-steps and introduce new performance characteristics, so test carefully!


More information about the postgis-users mailing list