pgexperts / patroni

Runners to orchestrate a high-availability PostgreSQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replicas do not stream off of newly elected master

wongsl opened this issue · comments

I set up a cluster of 4 nodes. 1 master and 3 replicas streaming off the master. I'm using zookeeper setup. I launched patroni on all 4 nodes simultaneously. I shut postgres on the master node, patroni brings it back(expected). I then killed both patroni/postgres process on the master node, one of the current replicas becomes promoted as new master, elected via zookeeper, however the other replicas do not stream off new master (still streaming off of old master that has been shutdown).

commented

I'll start investigating this today.

Supposedly this issue was fixed in HEAD. However, Zalando folks introduce a new issue (patroni#110) which is preventing replicas from launching at all. Currently debugging.

So as of current upstream, this should be fixed. I've tested it up with patroni-compose, and everything redirects as expected. Please retest.

If you get a failure again, please share your patroni.yml.

That is, to be more specific, I used the patroni-compose repo to test failover: https://github.com/pgexperts/patroni-compose

On terminating the master container (node 2 at the time), node 3 promoted to the new master and node 1 followed it.