]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix the handling of two GUCs during upgrade.
authorAmit Kapila <akapila@postgresql.org>
Fri, 11 Jul 2025 04:58:29 +0000 (10:28 +0530)
committerAmit Kapila <akapila@postgresql.org>
Fri, 11 Jul 2025 04:58:29 +0000 (10:28 +0530)
commitf36e5774510d9221fb38c988a62392784ae87405
tree40d774b2cc18c11de9bd99bf56fc4930dc17bc79
parenta1973e54660619e0a0c76d1658188fcbe9e52a48
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 <jorsol@gmail.com>
Author: Dilip Kumar <dilipbalaut@gmail.com>
Reviewed by: vignesh C <vignesh21@gmail.com>
Reviewed by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Backpatch-through: 17, where it was introduced
Discussion: https://postgr.es/m/219561.1751826409@sss.pgh.pa.us
Discussion: https://postgr.es/m/18979-a1b7fdbb7cd181c6@postgresql.org
src/backend/access/transam/xlog.c
src/backend/replication/slot.c
src/backend/utils/misc/guc_tables.c
src/bin/pg_upgrade/server.c
src/include/utils/guc_hooks.h