Skip to content

Fix standby bootstrap when standby_primary_slot_name is set#1200

Open
mdoulabi1 wants to merge 1 commit into
zalando:triggerfrom
mdoulabi1:fix-standby-slot-bootstrap
Open

Fix standby bootstrap when standby_primary_slot_name is set#1200
mdoulabi1 wants to merge 1 commit into
zalando:triggerfrom
mdoulabi1:fix-standby-slot-bootstrap

Conversation

@mdoulabi1

Copy link
Copy Markdown

Summary

  • propagate standby_primary_slot_name to the standby bootstrap helper
  • stop pg_receivewal before postgres startup and preserve wal_fast
  • use restore_command.sh for local wal_fast replay during standby bootstrap
  • keep generic replica bootstrap free from standby slot leakage

Problem

When standby_primary_slot_name is configured, the bootstrap helper may not use the slot correctly, or the handoff from bootstrap WAL collection to postgres recovery may fail. This can lead to:

  • replication slot conflicts during startup
  • missing WAL errors after basebackup
  • broken standby bootstrap on large datasets or low-retention upstreams

Test

  • local script/harness validation for basebackup.sh
  • local script/harness validation for restore_command.sh
  • verified deployed standby bootstrap reaches healthy state
  • verified previous errors no longer appear:
    • replication slot "..." is active
    • requested WAL segment ... has already been removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant