pgpool2.git / summary / log / commit / refs
commit e16b9f0d94d20bc295b2da439749b81b03a7b72f
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Tue Mar 16 01:27:22 2021 +0000
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
src/protocol/child.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/protocol/child.c b/src/protocol/child.c
index 777858733..4fb6f7709 100644
--- a/src/protocol/child.c
+++ b/src/protocol/child.c
@@ -699,7 +699,11 @@ 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);
@@ -2120,5 +2124,3 @@ static int opt_sort(const void *a, const void *b)
{
return strcmp( *(char **)a, *(char **)b);
}
-
-
[parent: 9f15b73c8318]