Re: pgsql: libpq: Grease the protocol by default
Jacob Champion <jacob.champion@enterprisedb.com>
From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jelte Fennema-Nio <postgres@jeltef.nl>,
pgsql-hackers@lists.postgresql.org, Andrew Dunstan <andrew@dunslane.net>,
Nathan Bossart <nathandbossart@gmail.com>
Date: 2026-02-24T18:13:02Z
Lists: pgsql-hackers
On Tue, Feb 24, 2026 at 9:18 AM Jacob Champion <jacob.champion@enterprisedb.com> wrote: > I still need to run a sanity check with the > other 9.x lines to make sure I've selected the right cutoffs. The cutoffs don't behave the way I thought they would. Yesterday, I was about to complain that cluster.major_version was poorly named -- why call it that if you have to pass it through GET_MAJOR_VERSION() to get at what you want? -- but it does in fact contain _only_ the major version information, because that's all that PG_VERSION tells us. And unfortunately we don't save the result of the version check for the old postgres binary anywhere. So pg_upgrade will use max_protocol_version=3.0 with all servers v10 and below, in practice. There's nothing wrong with that behavior, but I think I should switch to a simple `< 1100` check in the code to avoid misleading people, unless anyone has a better way that won't significantly increase the cost of the backport. (I could potentially follow up with an improvement on HEAD, if the cost-benefit makes sense, but I'm not sure it does.) --Jacob
Commits
-
pg_upgrade: Use max_protocol_version=3.0 for older servers
- c47744ede01c 14.23 landed
- e726620d208e 15.18 landed
- a38ed212ff23 16.14 landed
- ad7fc3f1f83f 17.10 landed
- 1b2773179f31 18.4 landed
- a60a103386a1 19 (unreleased) landed
-
libpq: Grease the protocol by default
- 4966bd3ed95e 19 (unreleased) cited
-
libpq: Prepare for protocol grease during 19beta
- d8d7c5dc8f74 19 (unreleased) cited