Fix for no primary on standby pgpool when primary is quarantined on master
authorMuhammad Usama <m.usama@gmail.com>
Wed, 7 Aug 2019 15:22:01 +0000 (20:22 +0500)
committerMuhammad Usama <m.usama@gmail.com>
Thu, 8 Aug 2019 06:14:01 +0000 (11:14 +0500)
commit3922c12c1f8efbc1b5f2e7def1e0ff921aafb989
tree98d5e22b850305bdc02dfb221859c8ced7d0f576
parentcdf0d23134bd75b39b0abcfd99823384afc9fc8f
Fix for no primary on standby pgpool when primary is quarantined on master

Master watchdog Pgpool sends primary_node_id = -1 in the backend status sync
message if the primary node is quarantined on it. So standby watchdog Pgpool
must not update its primary_node_id if the primary backend node id in sync
message is invalid_node_id (-1) while the same sync message reports the
backend status of the current primary node as "NOT DOWN".

The issue was reported by  "Tatsuo Ishii <ishii@sraoss.co.jp>" and fixed by me
src/main/pgpool_main.c
src/watchdog/wd_json_data.c