Closed blelump closed 8 years ago
@blelump I was head deep in some different code and just saw your request for information.
The follow_no_leader
on a returning member allows Postgres to run health checks on any member coming online before participating in the HA process. This returning member starts as a follower, and thus can request and apply any WAL logs and validate it is in a consistent state before participating.
Hi,
I'm working on local psql cluster for horizontal scalability. I'm playing with Docker (docker-compose especially) and using @miketonks fork to achieve my goals and almost everything plays smoothly.
The cluster is built upon
docker.compose.yml
config file. When it starts for the first time, the election phase 'emits' master and slaves correctly, however when I shutdown the whole cluster (with etcd as well) and then start it once again, it's likely new master will be elected from a standby and it's just fine. The problem is with the old master (turned into standby), which basically crashes with logs:I've read this article which explains what happens and how to recover from this. I'm reviewing the
governor.py
code, seeing the if else block and wondering how to recover safely the old master. I mean what was the purpose, assuming the data exists, that the old master node shouldfollow_no_leader
. Could you elaborate that?