This article outlines the fallback strategy and interim operational requirements for upgrading a pg_auto_failover cluster from PostgreSQL 15 to PostgreSQL 17 in a staged manner (Primary + First Secondary first).
In scenarios with greater than or equal to 3 nodes where limited maintenance windows prevent a full cluster upgrade, users may opt to upgrade only the primary and one secondary. This creates an interim state where the remaining PG15 nodes are temporarily incompatible with the upgraded monitor and primary.
node-active process to exit and eventually stop PostgreSQL.pg_upgrade --link makes the old cluster unsafe to use once the new PG17 cluster has started, as files are shared between versions.Before upgrading the first two nodes, you must manage the remaining PG15 nodes (Nodes 3–6) to prevent cluster instability.
number_sync_standbys and synchronous_standby_names on the primary. If these are not adjusted before dropping nodes, the primary may block commits while waiting for standbys that are no longer present.Once Nodes 1 and 2 are on PG17, the remaining nodes must be rebuilt as fresh PG17 replicas.
pg_autoctl create postgres --maximum-backup-rate to throttle bandwidth and reduce impact on the PG17 primary (e.g., set to 50M).pg_autoctl create postgres typically manages its own pg_basebackup.The cutover to PG17 is a one-way door once the data directory is upgraded and the application begins writes.
If the upgrade of Nodes 1 and 2 fails before the application is pointed to the new PG17 cluster:
Once the application is live on PG17, there is no supported automatic rollback to PG15.
TRUNCATE) when moving from PG17 back to PG15.To avoid the risks of an in-place upgrade and the "Point of No Return," a Blue/Green strategy is recommended: