Prohibit max_slot_wal_keep_size to value other than -1 during upgrade.
authorAmit Kapila <akapila@postgresql.org>
Fri, 10 Nov 2023 03:15:01 +0000 (08:45 +0530)
committerAmit Kapila <akapila@postgresql.org>
Fri, 10 Nov 2023 03:15:01 +0000 (08:45 +0530)
commit8bfb231b43d7f6058041483f2b823dd52eac7bf8
tree311e53b4233a5db636bc0170d237622dabb5e3d5
parent5ba1ac99a8d8623604d3152be8fd9a201ba5240b
Prohibit max_slot_wal_keep_size to value other than -1 during upgrade.

We don't want existing slots in the old cluster to get invalidated during
the upgrade. During an upgrade, we set this variable to -1 via the command
line in an attempt to prevent such invalidations, but users have ways to
override it. This patch ensures the value is not overridden by the user.

Author: Kyotaro Horiguchi
Reviewed-by: Peter Smith, Alvaro Herrera
Discussion: http://postgr.es/m/20231027.115759.2206827438943188717.horikyota.ntt@gmail.com
src/backend/access/transam/xlog.c
src/backend/replication/slot.c
src/backend/utils/misc/guc_tables.c
src/include/utils/guc_hooks.h