pgpool: Fix handling of negotiate protocol version message.

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgpool-committers(at)lists(dot)postgresql(dot)org
Subject: pgpool: Fix handling of negotiate protocol version message.
Date: 2026-11-18 02:43:46
Message-ID: E1xTVeC-0000000CpEM-3m3f@gothos.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-committers

Fix handling of negotiate protocol version message.

ProcessNegotiateProtocol() saves NegotiateProtocolVersion message in a
Startup packet (sp->negotiateProtocolMsg) when initial connection to
backend is established. Unfortunately there was a bug with it.
Actually part of the message (unsupported optional messages) was not
saved. This prevented reusing the connection if frontend actually
checks unsupported optional messages are in the NegotiateProtocol
message.

This was discovered in PostgreSQL 19 beta while "greasing".
https://www.postgresql.org/message-id/DDZ539Z6JWSB.1BF62QDLBANQA%40jeltef.nl

This commit is a back port of commit on the master branch:
7bcb55898a9a1fbac39dcecf5c9762f38213237f

It was accidently forgot to port to 4.7. Since v4.7 we support the
NegotiateProtocolVersion message.

Branch
------
V4_7_STABLE

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

Modified Files
--------------
src/auth/pool_auth.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

Browse pgpool-committers by date

  From Date Subject
Next Message Tatsuo Ishii 2026-11-18 02:53:49 pgpool: Fix typo in pgproto's error message.
Previous Message Tatsuo Ishii 2026-11-17 05:27:37 pgpool: Test: fix 135.describe_bugs.