Patroni: Automatic recovery from leader change in primary or secondary
- Whenever a new Leader is elected, the PgBouncer instance must be reconfigured to point to the new Leader. (true for both Primary and Secondary --> Distribution plus Geo concern)
- Potential solution: HAproxy? see https://patroni.readthedocs.io/en/latest/README.html?highlight=haproxy#running-and-configuring
- Always point to HAproxy and then this becomes an internal concern
- We don't package HAproxy yet, integrate with Patroni
- Issue needs to be created
- Whenever a new Leader is elected on the primary node, the Standby Leader on the secondary needs to be reconfigured to point to the new Leader.
- A secondary can't connect to pgbouncer to support replication
- HAproxy is needed on the primary for the secondary to replicate
- Today we go directly to the node and you have to repoint manually
- Not everything needs to be replicated again because of
pg_rewind
support - Issue needs to be created
- Docs update gitlab#231252 (closed)
Edited by Fabian Zimmer