ubicloud/spec
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
..
clec Introduce autoloading of a test helper 2024-10-29 07:40:12 -07:00
lib Update PostgresResource to write to the desired version column 2025-09-15 19:29:07 +02:00
model Implement Prog::Postgres::UpgradePostgresResource 2025-09-15 19:41:58 +02:00
prog Implement Prog::Postgres::UpgradePostgresResource 2025-09-15 19:41:58 +02:00
routes Update PostgresResource to write to the desired version column 2025-09-15 19:29:07 +02:00
scheduling Make vring_workers configurable in Vm::Nexus.assemble. 2025-09-09 11:58:45 -07:00
serializers Switch PostgresResource to use desired_version instead of version 2025-09-15 19:29:07 +02:00
cli_config.ru Support setting of PGPASSWORD in bin/ubi and cli/ubi 2025-08-06 02:10:02 +09:00
cli_spec.rb Update to Puma 7 2025-09-09 02:10:31 +09:00
config_spec.rb Increase Config test coverage and delete unused lines 2023-08-07 01:05:05 +03:00
coverage_helper.rb Fix coverage filters 2025-08-23 04:18:37 +09:00
db_spec.rb Check all encrypted columns are redacted 2025-07-17 00:44:14 +09:00
monitor_smoke_test.rb Add debugging output on monitor_smoke_test failure 2025-08-27 04:31:39 +09:00
resource_methods_spec.rb Change all create_with_id to create 2025-08-06 01:55:51 +09:00
respirate_smoke_test.rb Make partitioned respirate automatically rebalance based on number of workers 2025-06-14 01:46:43 +09:00
ruby_sdk_spec.rb Add pg modify-firewall-rule to the cli/sdk 2025-08-26 02:42:03 +09:00
spec_helper.rb Make leaked thread check ignore puma threads in cli spec 2025-09-04 06:26:02 +09:00
thawed_mock.rb Implement Prog::Postgres::UpgradePostgresResource 2025-09-15 19:41:58 +02:00
ubid_spec.rb Use create_with_id in the specs 2025-08-07 02:13:08 +09:00