Rework how logirep launchers are stopped during pg_upgrade
authorMichael Paquier <michael@paquier.xyz>
Thu, 11 Jan 2024 23:23:07 +0000 (08:23 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 11 Jan 2024 23:23:07 +0000 (08:23 +0900)
commit08c3ad27eb5348d0cbffa843a3edb11534f9904a
tree5b1ee5897c112ff185eceaf6da463b8b7828d61e
parent7786af4d74182ddd32e00f694bba741ee5d33efa
Rework how logirep launchers are stopped during pg_upgrade

This is a rework of 7021d3b17664, where we relied on forcing
max_logical_replication_workers to 0 in the postgres command.  This
commit now prevents logical replication launchers to start using -b and
a backend-side check based on IsBinaryUpgrade, effective when upgrading
from 17 and newer versions.

This commit improves the comments explaining why this restriction is
necessary.

This discussion was on hold until we were sure how to add support for
subscribers in pg_upgrade, something now done thanks to 9a17be1e244a.

Reviewed-by: Álvaro Herrera, Amit Kapila, Tom Lane
Discussion: https://postgr.es/m/ZU2TeVkUg5qEi7Oy@paquier.xyz
src/backend/replication/logical/launcher.c
src/bin/pg_upgrade/server.c