[pgpool-committers: 3764] pgpool: Remove elog/ereport calls from signal handlers.

Tatsuo Ishii ishii at postgresql.org
Wed Jan 11 09:43:03 JST 2017

Remove elog/ereport calls from signal handlers.

elog/ereport calls malloc(), which is not safe to be called inside
signal handlers, per discussion in [pgpool-hackers: 1950].  I ifdef
out them, rather than simply remove them in a hope we someday find a
better solution which make calling the functions inside signal

Not that I did not touch exit_handler() of pgpool_main.c because
removing elog/ereport from them loses informative message like
"received smart shutdown request". Pgpool-II main process do not
heavily use malloc(), so the risk is minimum, I guess.



Modified Files
src/main/pgpool_main.c | 21 ++++++++++++++++++++-
src/protocol/child.c   | 22 ++++++++++++++++++++--
2 files changed, 40 insertions(+), 3 deletions(-)

More information about the pgpool-committers mailing list