First cut of primary server checking.
authorTatsuo Ishii <ishii@postgresql.org>
Mon, 9 Apr 2018 08:44:21 +0000 (17:44 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Mon, 9 Apr 2018 08:44:21 +0000 (17:44 +0900)
commitf0631a6f260530616a5eb16b1538c2eb15abbac2
tree0dd0e1f3b57645612ebf85069f17e929a7e04820
parentea4df313e3cd60100113e2a9ee72440623748a72
First cut of primary server checking.

For now followings are implemented:

- Check all backend nodes starting node 0.

- If primary nodes appear twice or more, the second one or after are
  assumed invalid.

- Such invalid node will be degenerated at the next convenient
  time. Currently such timing is at the start up of Pgpool-II. This is
  apparently insufficient and should be improved later.

TODO:
- Verify primary nodes using pg_stat_wal_receiver.

- More chances to verify node status. Maybe in the same timing as
  streaming replication delay checking?

- Add new GUCs to control of this feature.
src/include/pool.h
src/main/pgpool_main.c
src/streaming_replication/pool_worker_child.c