pgpool2.git / summary / log / commit / refs

commit    4c143c187c5ef2b1155a199b60327acfb264bea5
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Thu Apr 21 05:27:27 2022 +0000

    Add more logging to exit_handler in pgpool main process.


src/main/main.c | 2 +- src/main/pgpool_main.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/main.c b/src/main/main.c index 575bee4a6..bd1a416c1 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -539,7 +539,7 @@ stop_me(void) errdetail("%m"))); } ereport(LOG, - (errmsg("stop request sent to pgpool. waiting for termination..."))); + (errmsg("stop request sent to pgpool (pid: %d). waiting for termination...", pid))); while (kill(pid, 0) == 0) { diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c index f0d362ac1..ae6b55b3b 100644 --- a/src/main/pgpool_main.c +++ b/src/main/pgpool_main.c @@ -1106,6 +1106,9 @@ static RETSIGTYPE exit_handler(int sig) int *walk; int save_errno = errno; + ereport(LOG, + (errmsg("exit handler called (signal: %d)", sig))); + POOL_SETMASK(&AuthBlockSig); /* @@ -1132,8 +1135,6 @@ static RETSIGTYPE exit_handler(int sig) */ if (exiting) { - ereport(LOG, - (errmsg("exit handler (signal: %d) called. but exit handler is already in progress", sig))); POOL_SETMASK(&UnBlockSig); errno = save_errno; return; [parent: 6d49bd2d58f4]