Can I promote a slave node to be a master for insert/update/delete using Patroni once the original master goes down?
Postgresql Master/Slave Using Patroni
patronipostgresql
Related Question
- PostgreSQL Slave Failed After Master Failure – Unable to Promote
- Patroni – Handling Long Disconnected Replica from Primary
- HA PostgreSQL Installation Using Patroni and pgbouncer
- Postgresql – What happens if a DC goes down in a Postgresql, Patroni, etcd multi DC setup
- Postgresql – Highly Available PostgreSQL with patroni
Best Answer
The whole point of Patroni is that you don't have to do that yourself, but that Patroni does it for you automatically.
The nodes communicate regularly via a distributed consensus store that decides who is online and who isn't, and arbiters who of the available nodes should become the leader.
You can also tell Patroni manually to switch leader, even if all nodes are up (a "switchover").