From ad423065f1c8996d36ad093c8fbff2f89104d892 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Thu, 4 Apr 2024 20:44:53 +0900 Subject: [PATCH] Fix segfault in pgpool main process. This is a follow up commit for 0564864e "Fix assorted causes of segmentation fault.". It lacked the fix while verify_backend_node calls get_server_version, i.e. checking availability of slots. Patch provided by: Emond Papegaaij Backpatch-through: v4.4 Discussion: [pgpool-general: 9072] Re: Segmentation after switchover https://www.pgpool.net/pipermail/pgpool-general/2024-April/009133.html --- src/main/pgpool_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c index 106b9cd58..ebaebbf20 100644 --- a/src/main/pgpool_main.c +++ b/src/main/pgpool_main.c @@ -2555,6 +2555,9 @@ verify_backend_node_status(POOL_CONNECTION_POOL_SLOT * *slots) if (!VALID_BACKEND(i)) continue; + if (!slots[i]) + continue; + if (get_server_version(slots, i) >= 90600) { check_connectivity = true; -- 2.39.5