Migrate PostgreSQL cluster to PG14 #625
Reference in New Issue
Block a user
Delete Branch "feature/postgresql_migration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a bunch of management scripts and other changes to aid with cluster migration by replication.
Since physical replication is not supported between major versions, we set up a new standalone primary/cluster, import a dump from the current cluster, and then use logical replication to keep data in sync until the switchover.
See
doc/postgres/migration.mdfor the full migration runbook and usage of scripts.closes #504
Databases
Migrate PostgreSQL cluster to PG14to WIP: Migrate PostgreSQL cluster to PG14@@ -0,0 +1,9 @@#!/bin/bashcd /tmp && \(pg_dumpall --globals-only > globals.sql) && \psql -Atqc "SELECT datname FROM pg_database WHERE datallowconn AND datname NOT IN (''template0'',''postgres'')" | \Why is it
template0instead oftemplate1like in all the other places?Ohai @fsmanuel, (very) long time no see!
That's a good catch, it should be
template1, becausetemplate0is automatically excluded by the preceding condition (it doesn't allow connections).Thanks! 🙏
WIP: Migrate PostgreSQL cluster to PG14to Migrate PostgreSQL cluster to PG14Added more changes and fixes, as well as the new cluster node configs. I think we're ready to merge...
@@ -0,0 +7,4 @@role "replica_logical"end# primary = postgresql_primaryWere these lines left here intentionally?
Not really, just didn't care I guess. I removed them.
👍