[pgpool-committers: 3766] 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
handlers.

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.

Branch
------
V3_4_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=b6062fed39ba9d3cab3c909cf45199ac61c6ec0d

Modified Files
--------------
src/main/pgpool_main.c | 26 ++++++++++++++++++++++----
src/protocol/child.c   | 22 ++++++++++++++++++++--
2 files changed, 42 insertions(+), 6 deletions(-)



More information about the pgpool-committers mailing list