agora inbox for [email protected]
help / color / mirror / Atom feedRe: AWL: PostgreSQL ODBC.
969+ messages / 3 participants
[nested] [flat]
* Re: AWL: PostgreSQL ODBC.
@ 1998-10-27 15:23 Thomas G. Lockhart <[email protected]>
0 siblings, 1 reply; 969+ messages in thread
From: Thomas G. Lockhart @ 1998-10-27 15:23 UTC (permalink / raw)
To: [email protected]; Postgres Hackers List <[email protected]>; Tom Lane <[email protected]>
> YES! That's exactly the problem! Relinked with -Bsymbolic (which
> necessitates -lc -lm, as well) and all's fine. Thanks.
> > In testing on my machine the linking works correctly...
> Yup. It doesn't use -Bsymbolic by default.
Darn. It was apparently broken when the main Postgres distribution went
to this new separate Makefile.shlib. Will look at it, and it should be
fixed up in time for the v6.4 release. In the meantime your workaround
is the right thing to do, including the "-lc -lm" flags.
Sorry for the pain, but it took me two weeks of poking to figure out
this "misdirected linking problem", so I'm just spreading the joy around
a little bit ;)
- Thomas
Tom, I'm thinking of putting a "LDFLAGS_ODBC" into the port-specific
Makefile, to keep this goofy set of flags separate from other shared
libraries. They are necessary because the iodbc driver has _exactly_ the
same entry point names as the psqlodbc driver, and the linker
preferentially chooses the iodbc ones when resolving links (the setup is
that the iodbc generic driver dynamically links in the psqlodbc
db-specific one when connecting to a database). So you need to force
them beforehand with this flags, at least on Linux.
^ permalink raw reply [nested|flat] 969+ messages in thread
* Re: [HACKERS] Re: AWL: PostgreSQL ODBC.
@ 1998-10-27 16:49 Tom Lane <[email protected]>
parent: Thomas G. Lockhart <[email protected]>
0 siblings, 1 reply; 969+ messages in thread
From: Tom Lane @ 1998-10-27 16:49 UTC (permalink / raw)
To: Thomas G. Lockhart <[email protected]>; +Cc: [email protected]; Postgres Hackers List <[email protected]>
"Thomas G. Lockhart" <[email protected]> writes:
> Tom, I'm thinking of putting a "LDFLAGS_ODBC" into the port-specific
> Makefile, to keep this goofy set of flags separate from other shared
> libraries. They are necessary because the iodbc driver has _exactly_ the
> same entry point names as the psqlodbc driver,
Yipes. I suppose it's far too late to suggest that that convention is
guaranteed to create porting problems?
> and the linker
> preferentially chooses the iodbc ones when resolving links (the setup is
> that the iodbc generic driver dynamically links in the psqlodbc
> db-specific one when connecting to a database). So you need to force
> them beforehand with this flags, at least on Linux.
I suspect that some such hackery will be necessary on almost every
platform. Maybe you should put LDFLAGS_ODBC into the template files
instead of the port makefiles? I've never been real clear on why
we have both sets of mechanism...
Anyway, I'd suggest making all of the LDFLAGS_SL assignments in
Makefile.shlib be += rather than :=, and then the Makefile for the
ODBC driver can add on the LDFLAGS_ODBC from wherever we decide to
get them. Are there any other hacks besides setting more flags that
we are likely to need?
regards, tom lane
^ permalink raw reply [nested|flat] 969+ messages in thread
* Re: [HACKERS] Re: AWL: PostgreSQL ODBC.
@ 1998-10-27 17:20 Thomas G. Lockhart <[email protected]>
parent: Tom Lane <[email protected]>
0 siblings, 1 reply; 969+ messages in thread
From: Thomas G. Lockhart @ 1998-10-27 17:20 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Postgres Hackers List <[email protected]>
> > Tom, I'm thinking of putting a "LDFLAGS_ODBC" into the port-specific
> > Makefile,
> I suspect that some such hackery will be necessary on almost every
> platform. Maybe you should put LDFLAGS_ODBC into the template files
> instead of the port makefiles?
Yes, that's what I meant...
> Anyway, I'd suggest making all of the LDFLAGS_SL assignments in
> Makefile.shlib be += rather than :=, and then the Makefile for the
> ODBC driver can add on the LDFLAGS_ODBC from wherever we decide to
> get them. Are there any other hacks besides setting more flags that
> we are likely to need?
Actually, I don't know why the Makefile.shlib needs anything
platform-specific other than perhaps helping with the naming conventions
for libraries. If the LDFLAGS_SL was in the platform template then
Makefile.shlib wouldn't need anything in that regard, right?
> Are there any other hacks besides setting more flags that
> we are likely to need?
Don't know. That's why they are hacks :)
^ permalink raw reply [nested|flat] 969+ messages in thread
* Re: [HACKERS] Re: AWL: PostgreSQL ODBC.
@ 1998-10-27 18:48 Tom Lane <[email protected]>
parent: Thomas G. Lockhart <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Tom Lane @ 1998-10-27 18:48 UTC (permalink / raw)
To: Thomas G. Lockhart <[email protected]>; +Cc: Postgres Hackers List <[email protected]>
"Thomas G. Lockhart" <[email protected]> writes:
> Actually, I don't know why the Makefile.shlib needs anything
> platform-specific other than perhaps helping with the naming conventions
> for libraries. If the LDFLAGS_SL was in the platform template then
> Makefile.shlib wouldn't need anything in that regard, right?
You're right, much of that stuff could be shoved out into the
Makefile.port files. Maybe all of it --- does anyone know GNU Make's
substitution rules well enough to know whether
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
can appear *before* NAME and so forth get defined? If so, the
library naming rule could be defined by Makefile.port too. I was
being conservative when I wrote Makefile.shlib, but I'm not sure
that the order of declarations it recommends is really essential.
regards, tom lane
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 969+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 969+ messages in thread
end of thread, other threads:[~2026-04-10 10:17 UTC | newest]
Thread overview: 969+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-10-27 15:23 Re: AWL: PostgreSQL ODBC. Thomas G. Lockhart <[email protected]>
1998-10-27 16:49 ` Tom Lane <[email protected]>
1998-10-27 17:20 ` Thomas G. Lockhart <[email protected]>
1998-10-27 18:48 ` Tom Lane <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[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