]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pg_upgrade: Use max_protocol_version=3.0 for older servers
authorJacob Champion <jchampion@postgresql.org>
Tue, 24 Feb 2026 22:01:37 +0000 (14:01 -0800)
committerJacob Champion <jchampion@postgresql.org>
Tue, 24 Feb 2026 22:01:37 +0000 (14:01 -0800)
commita60a103386a1e8bde65fa80feb2486d23bacbbcd
tree11a97f61d45c9b372ede5dcbc8a88ed719b1a300
parent65707ed9afc924e0eec19a706b24af5bae1f9574
pg_upgrade: Use max_protocol_version=3.0 for older servers

The grease patch in 4966bd3ed found its first problem: prior to the
February 2018 patch releases, no server knew how to negotiate protocol
versions, so pg_upgrade needs to take that into account when speaking to
those older servers.

This will be true even after the grease feature is reverted; we don't
need anyone to trip over this again in the future. Backpatch so that all
supported versions of pg_upgrade can gracefully handle an update to the
default protocol version. (This is needed for any distributions that
link older binaries against newer libpqs, such as Debian.) Branches
prior to 18 need an additional version check, for the existence of
max_protocol_version.

Per buildfarm member crake.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAOYmi%2B%3D4QhCjssfNEoZVK8LPtWxnfkwT5p-PAeoxtG9gpNjqOQ%40mail.gmail.com
Backpatch-through: 14
src/bin/pg_upgrade/dump.c
src/bin/pg_upgrade/pg_upgrade.h
src/bin/pg_upgrade/server.c
src/bin/pg_upgrade/task.c
src/bin/pg_upgrade/version.c