pgpool2.git / summary / log / commit / refs
commit 2a17c7d4ddb7f055807aa9feb0db8dee6e8cdef2
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Tue Jan 06 10:18:39 2026 +0000
Fix health check process to not start.
Previously pgpool_main() did not start a health check process if the
backend node is down. This prevented auto_failback from working.
Pgpool reads status from pool_status file when "-D" option is not
present. If the status recorded in the file is "down", pgpool will
not start health check process for the node. Since auto_failback is
invoked from health check process, this means that auto_failback does
not work for the backend node.
Fix is, unconditionally start health check process.
Author: Tatsuo Ishii <ishii@postgresql.org>
Reported-by: Meng Feilong
Discussion: https://github.com/pgpool/pgpool2/issues/140
Backpatch-through: v4.3
src/main/pgpool_main.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c
index 4d88c5815..5e7832a88 100644
--- a/src/main/pgpool_main.c
+++ b/src/main/pgpool_main.c
@@ -5,7 +5,7 @@
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2025 PgPool Global Development Group
+ * Copyright (c) 2003-2026 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
@@ -628,10 +628,8 @@ PgpoolMain(bool discard_status, bool clear_memcache_oidmaps)
/* Fork health check process */
for (i = 0; i < NUM_BACKENDS; i++)
- {
- if (VALID_BACKEND(i))
- health_check_pids[i] = worker_fork_a_child(PT_HEALTH_CHECK, do_health_check_child, &i);
- }
+ health_check_pids[i] =
+ worker_fork_a_child(PT_HEALTH_CHECK, do_health_check_child, &i);
if (sigsetjmp(local_sigjmp_buf, 1) != 0)
{
[parent: 53844460fea1]