pgexperts / patroni

Runners to orchestrate a high-availability PostgreSQL
MIT License
3 stars 0 forks source link

Replicas do not stream off of newly elected master #2

Open wongsl opened 8 years ago

wongsl commented 8 years ago

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).

ariyana commented 8 years ago

I'll start investigating this today.

jberkus commented 8 years ago

Supposedly this issue was fixed in HEAD. However, Zalando folks introduce a new issue (https://github.com/zalando/patroni/issues/110) which is preventing replicas from launching at all. Currently debugging.

jberkus commented 8 years ago

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.

jberkus commented 8 years ago

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.