[pgpool-committers: 6784] pgpool: Fix segmentation fault when application name is included in log
Tatsuo Ishii
ishii at sraoss.co.jp
Thu Jun 4 11:33:18 JST 2020
Fix segmentation fault when application name is included in log_line_prefix.
In Pgpool-II 4.1 or before log_line_prefix unconditionally tried to
fetch the application name from backend info (slots array).
Unfortunately in certain corner cases this was not possible. When
connection_cache is off, pgpool resets connection slots
(session->backend->slots[]) at the time when clients sends termination
request to pgpool. If log_min_messages is DEBUG5, pgpool wants to emit
this log message:
DEBUG: RESET ALL CONFIG VARIABLE
which caused a segfault because pgpool tried to refer NULL pointer.
Fix is, if session->backend->slots[] is NULL, do not try to fetch
application name from the variable.
Per bug 615.
Branch
------
V4_1_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=f4ca7ccd5a2561a536159ed696bd7980437c277e
Modified Files
--------------
src/utils/error/elog.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
More information about the pgpool-committers
mailing list