Bootstrapping a standby cluster using pgBackRest
Open
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 5.7k
- Forks
- 384
- Avg merge
- 2h 36m
- Merged PRs (30d)
- 2
Description
Pigsty sets create_replica_methods key in standby_cluster section to basebackup only. Can pgbackrest be supported too?
Implementation notes
- A standby cluster needs to restore from the upstream cluster's stanza during its bootstrap, which is different from
{{ pg_cluster }}used by cascade replicas replicating from standby leader. restore_commandof the standby leader should bet set topgbackrest archive-getwith the upstream cluster's stanza, in case some WAL segments on the upstream primary have been recycled during restore and could not be received via streaming replication.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with roles/pgsql/templates/oltp.yml around the standby_cluster create_replica_methods setting and read Patroni's custom replica creation documentation. Trace how the standby leader's restore_command is configured and how the upstream stanza differs from {{ pg_cluster }}. Done means a standby cluster can bootstrap from pgBackRest while retaining the required upstream WAL retrieval behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100