ubicloud/rhizome/postgres/bin
shikharbhardwaj 56bf890ae2
Implement Prog::Postgres::UpgradePostgresResource
The Upgrade prog is responsible for matching the current Postgres
version to the desired version. If there is a mismatch (current <
desired), the Upgrade prog is launched and takes precedence over
Convergence.

Roughly, the Upgrade prog does the following:
1. Create a new "candidate standby" with the same version as the current
   one and wait for it to catch up.
2. Fence the current primary.
3. Upgrade the candidate standby to the desired version.
4. Switch the candidate to use a new timeline.
5. Take over from the current primary.
6. Prune any older version servers and exit. The convergence prog will
   take care of starting any new standbys needed.

In case anything fails, we delete the candidate standby and unfence the
primary to bring the database back. During the Upgrade health checking
is effectively disabled as the auto-recovery causes conflicts with the
several restarts of various versions on the candidate.
2025-09-15 19:41:58 +02:00
..
configure Propagate user configs to PG server 2025-07-01 17:28:29 +05:30
configure-hugepages Configure hugepages for Postgres 2025-06-30 17:16:50 +05:30
initialize-database-from-backup Make PG run with unified image 2025-09-15 19:29:08 +02:00
initialize-empty-database Make PG run with unified image 2025-09-15 19:29:08 +02:00
install-wal-g Implement backup taking for PostgreSQL servers 2023-11-14 17:06:11 +01:00
lockout Don't close ubi_replication's connections 2025-07-07 19:11:45 +03:00
promote Implement Prog::Postgres::UpgradePostgresResource 2025-09-15 19:41:58 +02:00
restart Update data plane Postgres scripts to accept version as parameter 2024-10-25 13:44:27 +03:00
setup-hugepages Avoid hugepage allocation when PG is running 2025-07-01 16:30:19 +05:30
take-backup Update data plane Postgres scripts to accept version as parameter 2024-10-25 13:44:27 +03:00
upgrade Add rhizome changes for Postgres Major version upgrades 2025-09-15 19:41:58 +02:00