Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta
Date: 2026-02-18 23:11:02
Message-ID: CAGECzQRMJoLPs21zC3GQP=d7wHF=2aBzuOQW5SthWddNOf-x8w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 18 Feb 2026 at 21:28, Jacob Champion
<jacob(dot)champion(at)enterprisedb(dot)com> wrote:
> Would this patch result in desirable behavior for a legacy pgbouncer deployment?

I tried it out with PgBouncer commit f7ffd67ed8 (the one right before
NegotiateProtocolVersion support was added) and got the following back
with psql. So yes it works:

❯ psql -p 6432
psql: error: connection to server at "localhost" (127.0.0.1), port
6432 failed: FATAL: bad packet header: '000000710003270f'
This indicates a bug in either the server being contacted
or a proxy handling the connection. Please consider
reporting this to the maintainers of that software.
For more information, including instructions on how to
work around this issue for now, visit
https://www.postgresql.org/docs/devel/libpq-connect.html#LIBPQ-CONNECT-MAX-PROTOCOL-VERSION

I think "_pq_." would be very unlikely to cause false positives too
*currently*, because it's the only protocol extension we're currently
requesting. But I'm not sure that will remain true after we actually
add support for some extensions (e.g. the error could be about an
invalid option being used for a valid protocol extension). So I'd say
let's stay on the "we're sure it's a bug" side and not use it as a
heuristic. I still have some not so secret hope that you (or another
committer) will have time to look at my GoAway patch and realise it's
pretty trivial and safe to commit.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-02-18 23:12:47 Re: pg_stat_io_histogram
Previous Message Tom Lane 2026-02-18 22:41:52 Re: generating function default settings from pg_proc.dat