I wanted to move my postgres leader region from SYD to LAX.
I created a replica in LAX, but couldn’t find a way to trigger the failover.
I tried restarting the SYD postgres VM but it just restarted as leader.
I tried deleting the SYD pg_data volume, which remove the leader, but now
the replica seems stuck as a replica with no leader:
2022-04-22T05:55:59Z app[ba4a2446] lax [info]sentinel | 2022-04-22T05:55:59.401Z INFO cmd/sentinel.go:1006 trying to find a new master to replace failed master
2022-04-22T05:55:59Z app[ba4a2446] lax [info]sentinel | 2022-04-22T05:55:59.401Z INFO cmd/sentinel.go:741 ignoring keeper since it cannot be master (--can-be-master=false) {"db": "4bfd05f3", "keeper": "7d180d2f82"}
2022-04-22T05:55:59Z app[ba4a2446] lax [info]sentinel | 2022-04-22T05:55:59.401Z ERROR cmd/sentinel.go:1009 no eligible masters
2022-04-22T05:56:01Z app[ba4a2446] lax [info]keeper | 2022-04-22T05:56:01.738Z INFO cmd/keeper.go:1556 our db requested role is standby {"followedDB": "ebc4d408"}
2022-04-22T05:56:06Z app[ba4a2446] lax [info]sentinel | 2022-04-22T05:56:06.146Z WARN cmd/sentinel.go:276 no keeper info available {"db": "ebc4d408", "keeper": "2983094dd2"}
2022-04-22T05:56:06Z app[ba4a2446] lax [info]sentinel | 2022-04-22T05:56:06.150Z INFO cmd/sentinel.go:995 master db is failed {"db": "ebc4d408", "keeper": "2983094dd2"}
2022-04-22T05:56:06Z app[ba4a2446] lax [info]sentinel | 2022-04-22T05:56:06.151Z INFO cmd/sentinel.go:1006 trying to find a new master to replace failed master
2022-04-22T05:56:06Z app[ba4a2446] lax [info]sentinel | 2022-04-22T05:56:06.151Z INFO cmd/sentinel.go:741 ignoring keeper since it cannot be master (--can-be-master=false) {"db": "4bfd05f3", "keeper": "7d180d2f82"}
So I have two questions:
- What is the recommended process to change the postgres leader region?
- Why didn’t failover work in this instance? (I expected the LAX replica would be promoted to leader)