postgresql-ha-final.yaml: add matching primary_slot_name (keep byte-identical with staging)
ci/woodpecker/push/deploy Pipeline was successful

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.
This commit is contained in:
2026-08-04 20:04:50 -07:00
parent 7a06b040ad
commit 8f860ab14d
+18 -2
View File
@@ -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: