From 8f860ab14d55d69987c3392d78d2fd4d8380b4fa Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 4 Aug 2026 20:04:50 -0700 Subject: [PATCH] postgresql-ha-final.yaml: add matching primary_slot_name (keep byte-identical with staging) Mirrors the fix in postgresql-ha-staging.yaml: added primary_slot_name: standby_leader_slot to both patroni-0 and patroni-1's standby_cluster blocks so this file's specs stay byte-identical to staging's, per this file's own "do not recreate the live promoted primary/replica" design requirement. See postgresql-ha-staging.yaml header and the ADR-0001 note for full incident detail. --- postgresql/cutover/postgresql-ha-final.yaml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/postgresql/cutover/postgresql-ha-final.yaml b/postgresql/cutover/postgresql-ha-final.yaml index b412dde..9744f51 100644 --- a/postgresql/cutover/postgresql-ha-final.yaml +++ b/postgresql/cutover/postgresql-ha-final.yaml @@ -1,4 +1,4 @@ -# ────────────────────────────────────────────────────────────────────────── +# ───────────────────────────────────────────────────────────────────────── # postgresql/cutover/postgresql-ha-final.yaml — ADR-0001 Phase 3, Stage 3 # # Deployed by cutover.sh (Phase 7) as an UPDATE to the SAME "postgresqlha" @@ -41,7 +41,21 @@ # Once this is live and all consumers have verified (cutover.sh Phase 9), # legacy is scaled to 0 (Phase 10) and this becomes the sole answer for # the `postgresql`/`db` names on postgresql_db-backend. -# ────────────────────────────────────────────────────────────────────────── +# +# ── primary_slot_name (2026-08-04) ────────────────────────────────────── +# patroni-0/patroni-1's standby_cluster blocks below include +# `primary_slot_name: standby_leader_slot`, added to fix a real bootstrap +# failure (basebackup succeeded but the resulting Postgres process got +# stuck in "starting" forever because legacy had no replication slot +# protecting the WAL it needed to resume streaming — recycled by normal +# checkpoint activity during the 8-11 min basebackup window). Full +# incident detail and the matching production-side fix (a physical slot +# named standby_leader_slot created on legacy, plus wal_keep_size bumped +# to 4GB as defense-in-depth) are documented in postgresql-ha-staging.yaml's +# header and in the "ADR-0001 Dry-Run Debugging Log" note. This value MUST +# stay identical to the staging file's per the byte-identical requirement +# noted above — if you ever change one, change both. +# ───────────────────────────────────────────────────────────────────────── version: "3.6" services: @@ -149,6 +163,7 @@ services: standby_cluster: host: postgresql port: 5432 + primary_slot_name: standby_leader_slot create_replica_methods: - basebackup_fast_xlog secrets: @@ -198,6 +213,7 @@ services: standby_cluster: host: postgresql port: 5432 + primary_slot_name: standby_leader_slot create_replica_methods: - basebackup_fast_xlog secrets: