|
|
|
|
|
by cconstantine
1969 days ago
|
|
I've done a few postgres upgrades, the first using pg_upgrade, and the last doing effectively what you did (it was even 9.x -> 12). My experience was that it needs to rewrite all the data for some tables/indexes under some circumstances, and the db won't be available while that happens. So, unless your db can be down for the time it takes to rewrite all that data it isn't really an option. After having done the upgrade through streaming logical replication I'm not sure I would try pg_upgrade again. I did the pg_upgrade style update a long time ago, so most details are fuzzy, but I remember setting up a string of replicas something like: primary -> [read_replica, backups_replica] read_replica -> [upgrade_replica] upgrade_replica -> [read_replica_upgraded, backups_replica_upgraded] This allowed us to do multiple practice rounds without putting any unnecessary load on the primary. I think we needed to re-initiate replication off 'upgrade_replica' after the upgrade, but we did the live update during low-load so the extra read load wasn't an issue. |
|