From b7ac3f76ad10e46fd6c0377e1bb04facc7a5ceed Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Fri, 26 Jun 2020 20:46:33 +0900 Subject: [PATCH] Fix startup packet reading process. If there are parameters other than "user", "database" and "application_name", reading startup packet resulted in failing to extract user: "no PostgreSQL user name specified in startup packet". This was found while a frontend was trying to speak replication protocol by using "replication=database". Discussion: https://www.pgpool.net/pipermail/pgpool-general/2020-June/007162.html --- src/protocol/child.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/protocol/child.c b/src/protocol/child.c index 6aaf52fd3..2ee2678ee 100644 --- a/src/protocol/child.c +++ b/src/protocol/child.c @@ -682,6 +682,10 @@ read_startup_packet(POOL_CONNECTION * cp) (errmsg("reading startup packet"), errdetail("application_name: %s", p))); } + else + { + p += (strlen(p) + 1); + } p += (strlen(p) + 1); } -- 2.39.5