From 693277bb72ed7aa655c48b79ab272391c5f3991c Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Tue, 10 Oct 2017 11:17:37 +0900 Subject: [PATCH] Add debug aid to disable postmaster shutdown detection. By turning on DISABLE_POSTMASTER_DOWN in detect_postmaster_down_error(), Pgpool-II will not detect postmaster shutdown event. --- src/protocol/pool_process_query.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/protocol/pool_process_query.c b/src/protocol/pool_process_query.c index a523cc947..02f10eab7 100644 --- a/src/protocol/pool_process_query.c +++ b/src/protocol/pool_process_query.c @@ -4057,6 +4057,12 @@ static int detect_postmaster_down_error(POOL_CONNECTION *backend, int major) (errmsg("detecting postmaster down error"))); return r; } + +#undef DISABLE_POSTMASTER_DOWN +#ifdef DISABLE_POSTMASTER_DOWN + return 0; +#endif + if (r == SPECIFIED_ERROR) { ereport(DEBUG1, -- 2.39.5