Re: pgsql: libpq: Grease the protocol by default

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: pgsql: libpq: Grease the protocol by default
Date: 2026-02-24 00:45:05
Message-ID: 3797860.1771893905@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> writes:
> Something like the attached (tested only against 9.2 so far)? I would
> plan to backpatch after feature freeze is lifted.

This does not fix it for me on a local buildfarm instance. I still get
the same failure during 9.2-to-HEAD cross-version upgrade:

==~_~===-=-===~_~== /home/buildfarm/bf-data/fs-upgrade.tester/HEAD/REL9_2_STABLE-dump1.log ==~_~===-=-===~_~==
pg_dumpall: error: connection to server on socket "/home/buildfarm/bf-data/tmp/buildfarm-0fIcMg/.s.PGSQL.5700" failed: FATAL: unsupported frontend protocol 3.9999: server supports 1.0 to 3.0
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

It's not obvious to me where the problem lies. I can replicate
the failure by trying to use HEAD's psql to connect to a 9.2
server, but adding -d "max_protocol_version=3.0" makes psql happy,
so why not pg_dumpall?

Also: I was initially baffled why you thought this needs
back-patching, but I guess you have one eye on packagers like
Debian who think they can make older versions use newer libpq.so.
It'd be good to spell out that reasoning in the commit message.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Jacob Champion 2026-02-24 01:05:45 Re: pgsql: libpq: Grease the protocol by default
Previous Message Jacob Champion 2026-02-23 23:41:46 Re: pgsql: libpq: Grease the protocol by default

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2026-02-24 01:05:45 Re: pgsql: libpq: Grease the protocol by default
Previous Message Henson Choi 2026-02-24 00:33:13 Re: SQL Property Graph Queries (SQL/PGQ)