For this recipe, we should already have three PostgreSQL servers. As usual, we'll assume they are named pg1, pg2, and pg3. If pg1 is the current primary, follow these steps to promote a different node to primary status:
- Execute the following command as the postgres user to initiate a failover:
patronictl failover -d pg1:2379 stampede
- Answer the presented prompts as directed.
- Wait a few seconds before running this command as the postgres user:
patronictl list -d pg1:2379 stampede