From: Tatsuo Ishii Date: Tue, 16 Mar 2021 01:27:22 +0000 (+0900) Subject: Enhance debug message upon receiving startup packet. X-Git-Tag: V3_6_26~16 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=f0aba670b64df88dc24a33042f46d564854fbec0;p=pgpool2.git Enhance debug message upon receiving startup packet. While processing a startup packet, database name, user name and application name are printed in DEBUG1, but other guc variables (if any) were not printed. This is not helpful when studying errors like "connection exists but startup packet length is not identical" problem (see https://www.pgpool.net/mantisbt/view.php?id=696). With this commit guc variables are now printed something like: 2021-03-16 10:21:32: child pid 5155: DEBUG: reading startup packet 2021-03-16 10:21:32: child pid 5155: DETAIL: guc name: client_encoding value: UTF8 --- diff --git a/src/protocol/child.c b/src/protocol/child.c index 1533b02de..a2faea878 100644 --- a/src/protocol/child.c +++ b/src/protocol/child.c @@ -645,7 +645,11 @@ static StartupPacket *read_startup_packet(POOL_CONNECTION *cp) } else { + ereport(DEBUG1, + (errmsg("reading startup packet"), + errdetail("guc name: %s value: %s", p, p+strlen(p)+1))); p += (strlen(p) + 1); + } p += (strlen(p) + 1);