pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix the handling of two GUCs during upgrade.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix the handling of two GUCs during upgrade.
@ 2025-07-11 05:32  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Amit Kapila @ 2025-07-11 05:32 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/72e6c08fea7cf59f5166e138aab927ad87570aa4

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(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix the handling of two GUCs during upgrade.
@ 2025-07-11 05:32  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Amit Kapila @ 2025-07-11 05:32 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/24f6c1bd41d0631a04cc956cc8cafa0b117ab625

Modified Files
--------------
src/backend/access/transam/xlog.c   | 33 ++++++++-------------------------
src/backend/replication/slot.c      | 12 ++++--------
src/backend/utils/misc/guc_tables.c |  2 +-
src/bin/pg_upgrade/server.c         | 11 -----------
src/include/utils/guc_hooks.h       |  2 --
5 files changed, 13 insertions(+), 47 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix the handling of two GUCs during upgrade.
@ 2025-07-11 05:32  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Amit Kapila @ 2025-07-11 05:32 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

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(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-07-11 05:32 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-07-11 05:32 pgsql: Fix the handling of two GUCs during upgrade. Amit Kapila <akapila@postgresql.org>
2025-07-11 05:32 pgsql: Fix the handling of two GUCs during upgrade. Amit Kapila <akapila@postgresql.org>
2025-07-11 05:32 pgsql: Fix the handling of two GUCs during upgrade. Amit Kapila <akapila@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox