Allow health check process to reload pgpool.conf.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 5 Jul 2019 05:32:43 +0000 (14:32 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 5 Jul 2019 05:49:04 +0000 (14:49 +0900)
When separate health check process was introduced, we forgot to send
signal to the health check process when pgpool.conf reload is
requested.

src/main/pgpool_main.c

index cd2576329f4a46b0934b5395e58b9a9a151bbd61..1e3472a742261688b71a11d9e17e880987303a28 100644 (file)
@@ -2883,6 +2883,16 @@ kill_all_children(int sig)
        /* make PCP process reload as well */
        if (sig == SIGHUP && pcp_pid > 0)
                kill(pcp_pid, sig);
+
+       /* make health check process reload as well */
+       if (sig == SIGHUP)
+       {
+               for (i = 0; i < NUM_BACKENDS; i++)
+               {
+                       if (health_check_pids[i] > 0)
+                               kill(health_check_pids[i], sig);
+               }
+       }
 }
 
 /*