Fix watchdog leader sync process to start health check process.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 8 Feb 2021 11:30:18 +0000 (20:30 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 8 Feb 2021 11:30:18 +0000 (20:30 +0900)
commit567b102fdace2285b03e3d3439942be3eadd2d14
tree04933bafb5710b4f1df7401f7d5570516eb3fec3
parent826062193ecba5fb2dae376c7d7202e67e6ba7ef
Fix watchdog leader sync process to start health check process.

When watchdog receives status change request from other watchdog node
and calls sync_backend_from_watchdog() to sync with status of leader
node, it forgot to start health check process. For example,

1) initial pgpool_status file indicates DB node 1 is down.
2) pgpool starts up but only starts health check process for DB node 0
   because node 1 is in down status.
3) pcp_attach_node is issued to other than leader pgpool node.
4) leader node updates the node status for DB node 1 and other node
   syncs the status. Since sync_backend_from_watchdog() does not start
   health check process, only on pgpool leader node starts health
   check process but other nodes do not.

To fix this starts health check process if necessary in
sync_backend_from_watchdog().
src/main/pgpool_main.c