Re: A recent message added to pg_upgade
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, Álvaro Herrera <alvherre@kurilemu.de>, Tom Lane <tgl@sss.pgh.pa.us>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, smithpb2250@gmail.com, bharath.rupireddyforpostgres@gmail.com, pgsql-hackers@lists.postgresql.org
Date: 2025-07-10T09:05:43Z
Lists: pgsql-hackers
On Thu, Jul 10, 2025 at 2:23 PM vignesh C <vignesh21@gmail.com> wrote: > > Few comments: > 1) With the current approach invalidation will not happen for logical > replication slots during upgrade operation, I felt we could retain > this assertion just in case in the future it gets called from > elsewhere, do you feel this assertion should be removed in the new > approach too? > - /* > - * The logical replication slots shouldn't be invalidated as GUC > - * max_slot_wal_keep_size is set to -1 and > - * idle_replication_slot_timeout is set to 0 during the binary > - * upgrade. See check_old_cluster_for_valid_slots() > where we ensure > - * that no invalidated before the upgrade. > - */ > - Assert(!(*invalidated && SlotIsLogical(s) && IsBinaryUpgrade)); > I don't think we need this assertion. This is a static function, and we skipped calling this function in its caller, so it doesn't make sense to have this assertion. > 2) Documentation > 2.a) Currently slot invalidation will not happen during upgrade > because of idle_replication_slot_timeout, do you feel we should add a > note in documentation or is it ok not to mention? > 2.b) Currently WAL removal will not happen during upgrade because of > max_slot_wal_keep_size, should we add a note about this. > We skip or do a few special things in other parts of the code during BinaryUpgrade, but don't mention those, so don't think we need to mention this one as well. -- With Regards, Amit Kapila.
Commits
-
Fix the handling of two GUCs during upgrade.
- 72e6c08fea7c 19 (unreleased) landed
- f36e5774510d 18.0 landed
- 24f6c1bd41d0 17.6 landed
-
Rework how logirep launchers are stopped during pg_upgrade
- 08c3ad27eb53 17.0 landed
-
Prohibit max_slot_wal_keep_size to value other than -1 during upgrade.
- 8bfb231b43d7 17.0 landed
-
Prevent startup of logical replication launcher during pg_upgrade
- 7021d3b17664 17.0 cited
-
Migrate logical slots to the new node during an upgrade.
- 29d0a77fa660 17.0 cited