Fix the handling of two GUCs during upgrade. Previously, the check_hook functions for max_slot_wal_keep_size and idle_replication_slot_timeout would incorrectly raise an ERROR for values set in postgresql.conf during upgrade, even though those values were not actively used in the upgrade process.
To prevent logical slot invalidation during upgrade, we used to set special values for these GUCs. Now, instead of relying on those values, we directly prevent WAL removal and logical slot invalidation caused by max_slot_wal_keep_size and idle_replication_slot_timeout. Note: PostgreSQL 17 does not include the idle_replication_slot_timeout GUC, so related changes were not backported. BUG #18979 Reported-by: jorsol <[email protected]> Author: Dilip Kumar <[email protected]> Reviewed by: vignesh C <[email protected]> Reviewed by: Alvaro Herrera <[email protected]> Backpatch-through: 17, where it was introduced Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected] Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f36e5774510d9221fb38c988a62392784ae87405 Modified Files -------------- src/backend/access/transam/xlog.c | 33 ++++++++------------------------- src/backend/replication/slot.c | 32 ++++---------------------------- src/backend/utils/misc/guc_tables.c | 4 ++-- src/bin/pg_upgrade/server.c | 18 ------------------ src/include/utils/guc_hooks.h | 4 ---- 5 files changed, 14 insertions(+), 77 deletions(-)
