I am experimenting with Fly Postgres, and I’m confused on one point. The cli and the docs explain that a minimum of three nodes are required for HA. So what happens in a failure scenario with a two node setup?
When I run fly postgres db list I see my two nodes:
NAME USERS
postgres flypgadmin, postgres, repmgr
repmgr flypgadmin, postgres, repmgr
However, fly postgres failover does not work:
Error promoting new leader, restarting existing leader
Waiting for old leader to finish stopping
Clearing existing machine lease...
Trying to start old leader
Old leader started succesfully
Error: Failed to run failover: Not enough machines to meet quorum requirements
So what do you do if the primary fails? There is clearly a working replica in the cluster. I assume without the HA setup you don’t get automatic failovers. But what manual steps would I need to take to promote the replica?
Fantastic write up, @shaun. I was able to perform this operation on my own and everything worked exactly as described. Running two nodes is perfect for my use case for a low-medium traffic app where HA is not (yet) a strong need, but I obviously want redundancy. I don’t mind getting pinged by monitoring and having to perform the promotion manually. Thanks for your help!