pgpool2.git / summary / log / commit / refs

commit    f9ab66c8cdb34ec4411985a20d34b533fdfaeea7
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Sun Oct 24 07:22:33 2021 +0000

    Enhance SIGHLD handler of Pgpool-II main process.
    
    When Pgpool-II child is killed by SIGKILL signal, the SIGHLD handler
    just emitted LOG level message as other signals.  But SIGKILL is an
    important event, for example killed by OOM killer. So emit a WARNING
    level message instead.
    
    Per suggestion from Michail Alexakis.
    Discussion: https://www.pgpool.net/pipermail/pgpool-general/2021-October/007808.html


src/main/pgpool_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c index eb1df00ae..80a25d00f 100644 --- a/src/main/pgpool_main.c +++ b/src/main/pgpool_main.c @@ -2389,10 +2389,13 @@ reaper(void) } if (WIFSIGNALED(status)) { - /* Child terminated by segmentation fault. Report it */ + /* Child terminated by segmentation fault or sigkill. Report it */ if (WTERMSIG(status) == SIGSEGV) ereport(WARNING, (errmsg("%s process with pid: %d was terminated by segmentation fault", exiting_process_name, pid))); + else if (WTERMSIG(status) == SIGKILL) + ereport(WARNING, + (errmsg("%s process with pid: %d was terminated by sigkill", exiting_process_name, pid))); else ereport(LOG, (errmsg("%s process with pid: %d exits with status %d by signal %d", exiting_process_name, pid, status, WTERMSIG(status)))); [parent: 6ed89298fb9a]