[pgpool-committers: 4502] pgpool: Fix segfault when %a is in log_line_prefix and debug message is

Tatsuo Ishii ishii at postgresql.org
Wed Jan 24 08:32:27 JST 2018


Fix segfault when %a is in log_line_prefix and debug message is on.

log_line_prefix() gets called to create a log line prefix string. If
"%a" is specified in "log_line_prefix" parameter, log_line_prefix()
calls MASTER_CONNECTION macro, which calls
pool_virtual_master_db_node_id(), which calls ereport(), which calls
log_line_prefix() if debug message is on. This leads to an infinite
recursion and a segfault. Fix is, calling MASTER_NODE_ID macro instead
of MASTER_CONNECTION macro.

Per bug 376.

Branch
------
master

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

Modified Files
--------------
src/utils/error/elog.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)



More information about the pgpool-committers mailing list