[pgpool-committers: 4505] 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
------
V3_4_STABLE

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

Modified Files
--------------
src/utils/error/elog.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)



More information about the pgpool-committers mailing list