Re: pgsql: libpq: Grease the protocol by default

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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
Subject: Re: pgsql: libpq: Grease the protocol by default
Date: 2026-02-24 15:55:20
Message-ID: ebe65134-a062-4e85-b7be-387f29ea3836@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


On 2026-02-23 Mo 9:08 PM, Tom Lane wrote:
> Jacob Champion<jacob(dot)champion(at)enterprisedb(dot)com> writes:
>> On Mon, Feb 23, 2026 at 4:45 PM Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> 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.
>> Right.
> Actually, that is going to be harder than you thought, because libpq
> before v18 will spit up on connection option "max_protocol_version".
> This patch will not work as-is for back-patching unless we care to
> also back-patch the addition of that option, which I'd be inclined
> to resist.
>
> Fortunately, we long ago had the foresight to invent PQlibVersion,
> so you could make addition of the extra option conditional on
> PQlibVersion(conn) >= 180000 in branches before 18.
>
>> Hmmm, looks like the -dump1.log output is actually from *before*
>> pg_upgrade actually runs:
> Yeah, I came to the same conclusion. I got a clean BF run using
> your patch together with the attached patch for the BF client.
> (In this patch, I did not worry about scenarios involving old
> minor releases. If Andrew is excited about that case he can
> extend the version-comparison logic.)
>
>

I am not worried about old minor releases. I am currently testing a
patch with similar intent to yours.

cheers

andrew

--
Andrew Dunstan
EDB:https://www.enterprisedb.com

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2026-02-24 16:17:40 Re: pgsql: libpq: Grease the protocol by default
Previous Message Bertrand Drouvot 2026-02-24 11:28:11 Re: PGPROC alignment (was Re: pgsql: Separate RecoveryConflictReasons from procsignals)

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2026-02-24 15:58:31 Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote
Previous Message Fujii Masao 2026-02-24 15:41:03 Re: Fix bug of clearing of waitStart in ProcWakeup()