Remove elog/ereport calls from signal handlers.
authorTatsuo Ishii <ishii@postgresql.org>
Tue, 10 Jan 2017 23:24:32 +0000 (08:24 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Tue, 10 Jan 2017 23:24:32 +0000 (08:24 +0900)
commit075297a96a2c8390fd937684365fa17b4bf84c27
treeebdc92c2a046a7006f4f35611a6c46fbff5191ed
parentcb8de6b6582a14b3bb1443a4cd2caf15b3d0f881
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.
src/main/pgpool_main.c
src/protocol/child.c