In my current example I have to migrate ~90 databases between 2 Servers ...
- source: debian11, postgres-11, postGIS 2.5
- target: rhel8, postgres-12, postGIS 3.2.2
on PostGIS upgrades i read in the manual
35.1.2.1. Dump/Restore
Dumping and restoring involves converting all the data to a platform neutral format (text representations) on dump, and back to native representations on restore, so it can be time consuming and CPU intensive. However, if you are migrating to a new architecture or operating system, it’s a required process. It’s also a time-tested and well-understood upgrade path, so if your database is not too big, there’s no reason not to stick with it.
- Dump your data pg_dumpall from the old database.
- Install the new version of PostgreSQL and the same version of PostGIS you are using in your old database. You need to match the PostGIS version so that the dump file function definitions reference an expected version of the PostGIS library.
- Initialize the new data area using the initdb program from the new software.
- Start the new server on the new data area. Restore the dump file using pg_restore.
that is quite clear but I do not get where the upgrade to a new PostGIS Version is happening in here?
based on the above it looks like I was bound to postGIS 2.5 forever. Or is this just the first step and I have to ...
- install new PostGIS on that postgres-12 server
- run
SELECT postgis_extensions_upgrade();
on each database