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.