<div dir="ltr">Hi Ishii-San<br><br>Can you please have a look at the attached patch to sync backend nodes states over the watchdog when the Pgpool-II nodes joins the watchdog cluster as a standby node.<div><br>Currently the Pgpool-II syncs the backend node states only at the time of startup which works fine for almost all cases except when the watchdog cluster becomes partitioned (because of some network problem) and after recovering from it when the Pgpool-II nodes (that are already up and serving) joins back the cluster. At that time the backend node status among different nodes can become In-sync among Pgpool-II nodes, which can be a major problem. The same type of scenario is also mentioned in bug report of 0000289: Inconsistent backend state (<a href="http://www.pgpool.net/mantisbt/view.php?id=289">http://www.pgpool.net/mantisbt/view.php?id=289</a>)</div><div><br>This work in progress patch solves this by syncing the backend status from the master watchdog node every time the Pgpool-II node&#39;s state change back to STANDBY. And the tricky part in this is how to service the pgpool-II children processes after updating the backend node status.</div><div><br>So can you please review the attached patch more specifically for the following two changes.<br><br>1-) The <font face="monospace, monospace"><b>sync_backend_from_watchdog</b></font><b>()</b> function logic where it decides when to restart the pgpool-II child process. (The most of the logic is adopted from the failover() function)<br><br>2-) The multiplexing of SIGUSR1 signal in pgpool-II main process. Now SIGUSR1 is used for two types of interrupts. a) failover and b) watchdog state change intimations.<br><br>Please note that the patch is generated against master branch and is still work in progress, So it has little extra and elevated log messages, which I will adjust before after completing the testing.</div><div><br><br>Thanks<br>Best Regards<br>Muhammad Usama<br></div></div>