Re: pgsql: libpq: Grease the protocol by default
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jacob Champion <jacob.champion@enterprisedb.com>
Cc: Andrew Dunstan <andrew@dunslane.net>,
Jelte Fennema-Nio <postgres@jeltef.nl>,
pgsql-hackers@lists.postgresql.org
Date: 2026-02-25T01:30:29Z
Lists: pgsql-hackers
Jacob Champion <jacob.champion@enterprisedb.com> writes:
> Oh, the envvar is clever. You'll probably want to do that only for the
> pg_dumpall invocation now that pg_upgrade is patched, though, so we
> don't cover up regressions.
I can confirm clean x-version tests on all branches with git tip
and this:
--- TestUpgradeXversion.pm.orig 2025-11-25 07:47:25.000000000 -0500
+++ TestUpgradeXversion.pm 2026-02-24 18:50:29.487530840 -0500
@@ -485,10 +485,14 @@ sub test_upgrade ## no critic (Subrou
# use the NEW pg_dumpall so we're comparing apples with apples.
setinstenv($self, "$installdir", $save_env);
+ local $ENV{PGMAXPROTOCOLVERSION} =
+ ($oversion le 'REL9_2_STABLE') ? "3.0" : "latest";
+
system( qq{"$installdir/bin/pg_dumpall" $dump_opts -p $sport -f }
. qq{"$upgrade_loc/origin-$oversion.sql" }
. qq{> "$upgrade_loc/$oversion-dump1.log" 2>&1});
return if $?;
+ delete $ENV{PGMAXPROTOCOLVERSION};
setinstenv($self, "$other_branch/inst", $save_env);
system( qq{"$other_branch/inst/bin/pg_ctl" -D }
which is Andrew's patch but with the envvar dropped as soon
as possible.
regards, tom lane
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