Re:PostgreSQL HA cluster failure: a post-mortem
by CyberDem0n on Thursday December 07, 2017 @09:53AM
(#15870431)
> if you accessing the DB but can't contact etcd/consul then you should stop accessing the DB because you might start doing unsafe writes.
If patroni can't update leader lock in Etcd, it will restart postgres in read-only mode. No writes will happen.
> like the patroni default haproxy config doesn't even seem to kill live connections which seems kind of risky.
That's not true: https://github.com/zalando/patroni/blob/master/haproxy.cfg#L...
Re:PostgreSQL HA cluster failure: a post-mortem
by benmmurphy on Thursday December 07, 2017 @09:59AM
(#15870482)
Ah. Thanks. I was looking at the template files but I guess that is not used or used for something else.
you also have to be careful with ensuring there is sufficient time gaps when failing over to cover the case when the master is not really down and connections are still writing to it. like the patroni default haproxy config doesn't even seem to kill live connections which seems kind of risky.