agora inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH 6/6] tweak costing for bloom/minmax-multi indexes
1936+ messages / 2 participants
[nested] [flat]

* [PATCH 6/6] tweak costing for bloom/minmax-multi indexes
@ 2020-08-07 13:53 Tomas Vondra <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Tomas Vondra @ 2020-08-07 13:53 UTC (permalink / raw)

---
 src/backend/access/brin/brin_bloom.c        |  1 +
 src/backend/access/brin/brin_minmax_multi.c |  1 +
 src/backend/utils/adt/selfuncs.c            | 19 ++++++++++++++++++-
 src/include/access/brin_internal.h          |  3 +++
 4 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/src/backend/access/brin/brin_bloom.c b/src/backend/access/brin/brin_bloom.c
index c2cbbd9400..03e9d4b713 100644
--- a/src/backend/access/brin/brin_bloom.c
+++ b/src/backend/access/brin/brin_bloom.c
@@ -681,6 +681,7 @@ brin_bloom_opcinfo(PG_FUNCTION_ARGS)
 
 	result = palloc0(MAXALIGN(SizeofBrinOpcInfo(1)) +
 					 sizeof(BloomOpaque));
+	result->oi_ignore_correlation = true;
 	result->oi_nstored = 1;
 	result->oi_regular_nulls = true;
 	result->oi_opaque = (BloomOpaque *)
diff --git a/src/backend/access/brin/brin_minmax_multi.c b/src/backend/access/brin/brin_minmax_multi.c
index 227927fcf5..c8f36b0c8a 100644
--- a/src/backend/access/brin/brin_minmax_multi.c
+++ b/src/backend/access/brin/brin_minmax_multi.c
@@ -1306,6 +1306,7 @@ brin_minmax_multi_opcinfo(PG_FUNCTION_ARGS)
 
 	result = palloc0(MAXALIGN(SizeofBrinOpcInfo(1)) +
 					 sizeof(MinmaxMultiOpaque));
+	result->oi_ignore_correlation = true;
 	result->oi_nstored = 1;
 	result->oi_regular_nulls = true;
 	result->oi_opaque = (MinmaxMultiOpaque *)
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 00c7afc66f..c00265a66d 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -98,6 +98,7 @@
 #include <math.h>
 
 #include "access/brin.h"
+#include "access/brin_internal.h"
 #include "access/brin_page.h"
 #include "access/gin.h"
 #include "access/table.h"
@@ -7350,7 +7351,8 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
 	double		minimalRanges;
 	double		estimatedRanges;
 	double		selec;
-	Relation	indexRel;
+	Relation	indexRel = NULL;
+	TupleDesc	tupdesc = NULL;
 	ListCell   *l;
 	VariableStatData vardata;
 
@@ -7372,6 +7374,7 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
 		 */
 		indexRel = index_open(index->indexoid, NoLock);
 		brinGetStats(indexRel, &statsData);
+		tupdesc = RelationGetDescr(indexRel);
 		index_close(indexRel, NoLock);
 
 		/* work out the actual number of ranges in the index */
@@ -7405,6 +7408,17 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
 	{
 		IndexClause *iclause = lfirst_node(IndexClause, l);
 		AttrNumber	attnum = index->indexkeys[iclause->indexcol];
+		FmgrInfo   *opcInfoFn;
+		BrinOpcInfo *opcInfo;
+		Form_pg_attribute attr = TupleDescAttr(tupdesc, iclause->indexcol);
+		bool		ignore_correlation;
+
+		opcInfoFn = index_getprocinfo(indexRel, iclause->indexcol + 1, BRIN_PROCNUM_OPCINFO);
+
+		opcInfo = (BrinOpcInfo *)
+			DatumGetPointer(FunctionCall1(opcInfoFn, attr->atttypid));
+
+		ignore_correlation = opcInfo->oi_ignore_correlation;
 
 		/* attempt to lookup stats in relation for this index column */
 		if (attnum != 0)
@@ -7475,6 +7489,9 @@ brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count,
 				if (sslot.nnumbers > 0)
 					varCorrelation = Abs(sslot.numbers[0]);
 
+				if (ignore_correlation)
+					varCorrelation = 1.0;
+
 				if (varCorrelation > *indexCorrelation)
 					*indexCorrelation = varCorrelation;
 
diff --git a/src/include/access/brin_internal.h b/src/include/access/brin_internal.h
index ee4d0706df..67aea62a02 100644
--- a/src/include/access/brin_internal.h
+++ b/src/include/access/brin_internal.h
@@ -30,6 +30,9 @@ typedef struct BrinOpcInfo
 	/* Regular processing of NULLs in BrinValues? */
 	bool		oi_regular_nulls;
 
+	/* Ignore correlation during cost estimation */
+	bool		oi_ignore_correlation;
+
 	/* Opaque pointer for the opclass' private use */
 	void	   *oi_opaque;
 
-- 
2.25.4


--2wz2lexbyaxcz4wc--





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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



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

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index edb515d4b3e..b4acaeb6b93 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--gwom7bl7ogtszo4k
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v44-0005-Rename-ChangeDest-to-ChangeContext-and-absorb-In.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread

* [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations
@ 2026-03-19 18:48 Álvaro Herrera <[email protected]>
  0 siblings, 0 replies; 1936+ messages in thread

From: Álvaro Herrera @ 2026-03-19 18:48 UTC (permalink / raw)

Author: Srinath Reddy Sadipiralla <[email protected]>
---
 src/backend/commands/cluster.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b0ecc769ee4..36950aea780 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -2666,6 +2666,21 @@ repack_setup_logical_decoding(Oid relid)
 	 */
 	Assert(!ctx->fast_forward);
 
+	/* Avoid logical decoding of other relations. */
+	rel = table_open(relid, AccessShareLock);
+	repacked_rel_locator = rel->rd_locator;
+	toastrelid = rel->rd_rel->reltoastrelid;
+	if (OidIsValid(toastrelid))
+	{
+		Relation	toastrel;
+
+		/* Avoid logical decoding of other TOAST relations. */
+		toastrel = table_open(toastrelid, AccessShareLock);
+		repacked_rel_toast_locator = toastrel->rd_locator;
+		table_close(toastrel, AccessShareLock);
+	}
+	table_close(rel, AccessShareLock);
+
 	DecodingContextFindStartpoint(ctx);
 
 	/*
@@ -2702,21 +2717,6 @@ repack_setup_logical_decoding(Oid relid)
 											   "REPACK - change",
 											   ALLOCSET_DEFAULT_SIZES);
 
-	/* Avoid logical decoding of other relations. */
-	rel = table_open(relid, AccessShareLock);
-	repacked_rel_locator = rel->rd_locator;
-	toastrelid = rel->rd_rel->reltoastrelid;
-	if (OidIsValid(toastrelid))
-	{
-		Relation	toastrel;
-
-		/* Avoid logical decoding of other TOAST relations. */
-		toastrel = table_open(toastrelid, AccessShareLock);
-		repacked_rel_toast_locator = toastrel->rd_locator;
-		table_close(toastrel, AccessShareLock);
-	}
-	table_close(rel, AccessShareLock);
-
 	/* The file will be set as soon as we have it opened. */
 	dstate->file = NULL;
 
-- 
2.47.3


--nzintiedl6o4kcyp
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
	filename="v43-0006-Fix-a-few-problems-in-index-build-progress-repor.patch"



^ permalink  raw  reply  [nested|flat] 1936+ messages in thread


end of thread, other threads:[~2026-03-19 18:48 UTC | newest]

Thread overview: 1936+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 13:53 [PATCH 6/6] tweak costing for bloom/minmax-multi indexes Tomas Vondra <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v44 04/10] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>
2026-03-19 18:48 [PATCH v43 5/7] Fix crash caused by involuntary decoding of unrelated relations Álvaro Herrera <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox