patroni / patroni

A template for PostgreSQL High Availability with Etcd, Consul, ZooKeeper, or Kubernetes
MIT License
6.78k stars 843 forks source link

Improve error message on switchover #743

Open Jan-M opened 6 years ago

Jan-M commented 6 years ago

On a high load cluster, the shutdown of the master may take longer than patronictl waits.

This yields the following error:

Switchover failed, details: 503, Switchover status unknown

In fact at this state the master is still in shutdown mode and the switch over is still happening once shut down. Not yet sure what to write, but "failed" sounds like nothing is going to happen and master is fine.

Wolfsrudel commented 4 years ago

Which timeout is decisive for this and how can I adjust it?

vinhnd20 commented 7 months ago

Can someone explain for me the mechanism of selecting candidate to promote master, pls?

CyberDem0n commented 7 months ago

@vinhnd20 I would recommend you to watch https://www.youtube.com/watch?v=SrFsInsK1ts. Unfortunately translation isn't perfect, but it's better than nothing. Slides are available here (slightly newer version): https://github.com/patroni-training/2019