agora inbox for [email protected]
help / color / mirror / Atom feedAdding missing object access hook invocations
976+ messages / 5 participants
[nested] [flat]
* Adding missing object access hook invocations
@ 2020-03-16 23:03 Mark Dilger <[email protected]>
2020-03-17 00:14 ` Re: Adding missing object access hook invocations Alvaro Herrera <[email protected]>
2020-03-17 18:49 ` Re: Adding missing object access hook invocations Andres Freund <[email protected]>
0 siblings, 2 replies; 976+ messages in thread
From: Mark Dilger @ 2020-03-16 23:03 UTC (permalink / raw)
To: [email protected] <[email protected]>
Hackers,
While working on object access hooks, I noticed several locations where I would expect the hook to be invoked, but no actual invocation. I think this just barely qualifies as a bug. It's debatable because whether it is a bug depends on the user's expectations and whether not invoking the hook in these cases is defensible. Does anybody have any recollection of an intentional choice not to invoke in these locations?
Patch attached.
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
[application/octet-stream] v1-0001-Adding-missing-Object-Access-hook-invocations.patch (3.5K, ../../[email protected]/2-v1-0001-Adding-missing-Object-Access-hook-invocations.patch)
download | inline diff:
From 2759f8deefc89e40eb6a299540961aa5e8fd6b61 Mon Sep 17 00:00:00 2001
From: Mark Dilger <[email protected]>
Date: Mon, 16 Mar 2020 08:53:32 -0700
Subject: [PATCH v1] Adding missing Object Access hook invocations.
There appears to be no reason for skipping the invocation of the
object access hook infrastructure for the following commands, yet
they were lacking the InvokeObject{PostCreate,PostAlter,Drop}Hook
calls that would be expected:
ALTER RULE
ALTER USER MAPPING
CREATE ACCESS METHOD
CREATE STATISTICS
DROP STATISTICS
DROP ACCESS METHOD
There doesn't seem to be any good regression test coverage for
when and how the object_access_hook is invoked, so no additional
coverage is included here, either. Adding regression test
coverage seems like another patch to be submitted separately.
---
src/backend/commands/amcmds.c | 5 +++++
src/backend/commands/foreigncmds.c | 3 +++
src/backend/commands/statscmds.c | 4 ++++
src/backend/rewrite/rewriteDefine.c | 2 ++
4 files changed, 14 insertions(+)
diff --git a/src/backend/commands/amcmds.c b/src/backend/commands/amcmds.c
index 7546378bbb..1ecad090ee 100644
--- a/src/backend/commands/amcmds.c
+++ b/src/backend/commands/amcmds.c
@@ -18,6 +18,7 @@
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
+#include "catalog/objectaccess.h"
#include "catalog/pg_am.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
@@ -107,6 +108,8 @@ CreateAccessMethod(CreateAmStmt *stmt)
recordDependencyOnCurrentExtension(&myself, false);
+ InvokeObjectPostCreateHook(AccessMethodRelationId, amoid, 0);
+
table_close(rel, RowExclusiveLock);
return myself;
@@ -134,6 +137,8 @@ RemoveAccessMethodById(Oid amOid)
CatalogTupleDelete(relation, &tup->t_self);
+ InvokeObjectDropHook(AccessMethodRelationId, amOid, 0);
+
ReleaseSysCache(tup);
table_close(relation, RowExclusiveLock);
diff --git a/src/backend/commands/foreigncmds.c b/src/backend/commands/foreigncmds.c
index f197869752..a399ab4de9 100644
--- a/src/backend/commands/foreigncmds.c
+++ b/src/backend/commands/foreigncmds.c
@@ -1343,6 +1343,9 @@ AlterUserMapping(AlterUserMappingStmt *stmt)
CatalogTupleUpdate(rel, &tp->t_self, tp);
+ InvokeObjectPostAlterHook(UserMappingRelationId,
+ umId, 0);
+
ObjectAddressSet(address, UserMappingRelationId, umId);
heap_freetuple(tp);
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 988cdba6f5..08d0da1109 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -374,6 +374,8 @@ CreateStatistics(CreateStatsStmt *stmt)
relation_close(datarel, RowExclusiveLock);
+ InvokeObjectPostCreateHook(StatisticExtRelationId, statoid, 0);
+
/*
* Invalidate relcache so that others see the new statistics object.
*/
@@ -568,6 +570,8 @@ RemoveStatisticsById(Oid statsOid)
CatalogTupleDelete(relation, &tup->t_self);
+ InvokeObjectDropHook(StatisticExtRelationId, statsOid, 0);
+
ReleaseSysCache(tup);
table_close(relation, RowExclusiveLock);
diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c
index afc78b3316..9989df1107 100644
--- a/src/backend/rewrite/rewriteDefine.c
+++ b/src/backend/rewrite/rewriteDefine.c
@@ -1003,6 +1003,8 @@ RenameRewriteRule(RangeVar *relation, const char *oldName,
CatalogTupleUpdate(pg_rewrite_desc, &ruletup->t_self, ruletup);
+ InvokeObjectPostAlterHook(RewriteRelationId, ruleOid, 0);
+
heap_freetuple(ruletup);
table_close(pg_rewrite_desc, RowExclusiveLock);
--
2.21.1 (Apple Git-122.3)
^ permalink raw reply [nested|flat] 976+ messages in thread
* Re: Adding missing object access hook invocations
2020-03-16 23:03 Adding missing object access hook invocations Mark Dilger <[email protected]>
@ 2020-03-17 00:14 ` Alvaro Herrera <[email protected]>
2020-03-17 00:58 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
1 sibling, 1 reply; 976+ messages in thread
From: Alvaro Herrera @ 2020-03-17 00:14 UTC (permalink / raw)
To: Mark Dilger <[email protected]>; +Cc: [email protected] <[email protected]>; Kohei KaiGai <[email protected]>; Adam Brightwell <[email protected]>
On 2020-Mar-16, Mark Dilger wrote:
> Hackers,
>
> While working on object access hooks, I noticed several locations where I would expect the hook to be invoked, but no actual invocation. I think this just barely qualifies as a bug. It's debatable because whether it is a bug depends on the user's expectations and whether not invoking the hook in these cases is defensible. Does anybody have any recollection of an intentional choice not to invoke in these locations?
Hmm, possibly the create-time calls are missing.
I'm surprised about the InvokeObjectDropHook calls though. Doesn't
deleteOneObject already call that? If we have more calls elsewhere,
maybe they are redundant. I think we should only have those for
"shared" objects.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 976+ messages in thread
* Re: Adding missing object access hook invocations
2020-03-16 23:03 Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-17 00:14 ` Re: Adding missing object access hook invocations Alvaro Herrera <[email protected]>
@ 2020-03-17 00:58 ` Mark Dilger <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Mark Dilger @ 2020-03-17 00:58 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; +Cc: [email protected] <[email protected]>; Kohei KaiGai <[email protected]>; Adam Brightwell <[email protected]>
> On Mar 16, 2020, at 5:14 PM, Alvaro Herrera <[email protected]> wrote:
>
> On 2020-Mar-16, Mark Dilger wrote:
>
>> Hackers,
>>
>> While working on object access hooks, I noticed several locations where I would expect the hook to be invoked, but no actual invocation. I think this just barely qualifies as a bug. It's debatable because whether it is a bug depends on the user's expectations and whether not invoking the hook in these cases is defensible. Does anybody have any recollection of an intentional choice not to invoke in these locations?
>
> Hmm, possibly the create-time calls are missing.
It looks to me that both the create and alter calls are missing.
>
> I'm surprised about the InvokeObjectDropHook calls though. Doesn't
> deleteOneObject already call that? If we have more calls elsewhere,
> maybe they are redundant. I think we should only have those for
> "shared" objects.
Yeah, you are right about the drop hook being invoked elsewhere for dropping ACCESS METHOD and STATISTICS. Sorry for the noise.
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 976+ messages in thread
* Re: Adding missing object access hook invocations
2020-03-16 23:03 Adding missing object access hook invocations Mark Dilger <[email protected]>
@ 2020-03-17 18:49 ` Andres Freund <[email protected]>
2020-03-17 19:39 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
1 sibling, 1 reply; 976+ messages in thread
From: Andres Freund @ 2020-03-17 18:49 UTC (permalink / raw)
To: Mark Dilger <[email protected]>; +Cc: [email protected] <[email protected]>
Hi,
On 2020-03-16 16:03:51 -0700, Mark Dilger wrote:
> While working on object access hooks, I noticed several locations
> where I would expect the hook to be invoked, but no actual invocation.
> I think this just barely qualifies as a bug. It's debatable because
> whether it is a bug depends on the user's expectations and whether not
> invoking the hook in these cases is defensible. Does anybody have any
> recollection of an intentional choice not to invoke in these
> locations?
I am strongly against treating this as a bug, which'd likely imply
backpatching. New hook invocations are a noticable behavioural change,
and very plausibly will break currently working extensions. That's fine
for a major version upgrade, but not for a minor one, unless there are
very good reasons.
Andres
^ permalink raw reply [nested|flat] 976+ messages in thread
* Re: Adding missing object access hook invocations
2020-03-16 23:03 Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-17 18:49 ` Re: Adding missing object access hook invocations Andres Freund <[email protected]>
@ 2020-03-17 19:39 ` Mark Dilger <[email protected]>
2020-03-18 04:33 ` Re: Adding missing object access hook invocations Michael Paquier <[email protected]>
0 siblings, 1 reply; 976+ messages in thread
From: Mark Dilger @ 2020-03-17 19:39 UTC (permalink / raw)
To: Andres Freund <[email protected]>; +Cc: [email protected] <[email protected]>
> On Mar 17, 2020, at 11:49 AM, Andres Freund <[email protected]> wrote:
>
> On 2020-03-16 16:03:51 -0700, Mark Dilger wrote:
>> While working on object access hooks, I noticed several locations
>> where I would expect the hook to be invoked, but no actual invocation.
>> I think this just barely qualifies as a bug. It's debatable because
>> whether it is a bug depends on the user's expectations and whether not
>> invoking the hook in these cases is defensible. Does anybody have any
>> recollection of an intentional choice not to invoke in these
>> locations?
>
> I am strongly against treating this as a bug, which'd likely imply
> backpatching. New hook invocations are a noticable behavioural change,
> and very plausibly will break currently working extensions. That's fine
> for a major version upgrade, but not for a minor one, unless there are
> very good reasons.
I agree that this does not need to be back-patched. I was debating whether it constitutes a bug for the purpose of putting the fix into v13 vs. punting the patch forward to the v14 cycle. I don't have a strong opinion on that.
Thoughts?
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 976+ messages in thread
* Re: Adding missing object access hook invocations
2020-03-16 23:03 Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-17 18:49 ` Re: Adding missing object access hook invocations Andres Freund <[email protected]>
2020-03-17 19:39 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
@ 2020-03-18 04:33 ` Michael Paquier <[email protected]>
2020-03-18 14:50 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
0 siblings, 1 reply; 976+ messages in thread
From: Michael Paquier @ 2020-03-18 04:33 UTC (permalink / raw)
To: Mark Dilger <[email protected]>; +Cc: Andres Freund <[email protected]>; [email protected] <[email protected]>
On Tue, Mar 17, 2020 at 12:39:35PM -0700, Mark Dilger wrote:
> I agree that this does not need to be back-patched. I was debating
> whether it constitutes a bug for the purpose of putting the fix into
> v13 vs. punting the patch forward to the v14 cycle. I don't have a
> strong opinion on that.
I don't see any strong argument against fixing this stuff in v13,
FWIW.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../../[email protected]/2-signature.asc)
download
^ permalink raw reply [nested|flat] 976+ messages in thread
* Re: Adding missing object access hook invocations
2020-03-16 23:03 Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-17 18:49 ` Re: Adding missing object access hook invocations Andres Freund <[email protected]>
2020-03-17 19:39 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-18 04:33 ` Re: Adding missing object access hook invocations Michael Paquier <[email protected]>
@ 2020-03-18 14:50 ` Mark Dilger <[email protected]>
2020-03-19 18:17 ` Re: Adding missing object access hook invocations Alvaro Herrera <[email protected]>
0 siblings, 1 reply; 976+ messages in thread
From: Mark Dilger @ 2020-03-18 14:50 UTC (permalink / raw)
To: Michael Paquier <[email protected]>; +Cc: Andres Freund <[email protected]>; [email protected] <[email protected]>
> On Mar 17, 2020, at 9:33 PM, Michael Paquier <[email protected]> wrote:
>
> On Tue, Mar 17, 2020 at 12:39:35PM -0700, Mark Dilger wrote:
>> I agree that this does not need to be back-patched. I was debating
>> whether it constitutes a bug for the purpose of putting the fix into
>> v13 vs. punting the patch forward to the v14 cycle. I don't have a
>> strong opinion on that.
>
> I don't see any strong argument against fixing this stuff in v13,
> FWIW.
Here is the latest patch. I'll go add this thread to the commitfest app now....
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
[application/octet-stream] v2-0001-Adding-missing-Object-Access-hook-invocations.patch (3.5K, ../../[email protected]/2-v2-0001-Adding-missing-Object-Access-hook-invocations.patch)
download | inline diff:
From 2759f8deefc89e40eb6a299540961aa5e8fd6b61 Mon Sep 17 00:00:00 2001
From: Mark Dilger <[email protected]>
Date: Mon, 16 Mar 2020 08:53:32 -0700
Subject: [PATCH v2] Adding missing Object Access hook invocations.
There appears to be no reason for skipping the invocation of the object
access hook infrastructure for the following commands, yet they were
lacking the InvokeObjectPostCreateHook and InvokeObjectPostAlterHook
calls that would be expected:
ALTER RULE
ALTER USER MAPPING
CREATE ACCESS METHOD
CREATE STATISTICS
There doesn't seem to be any good regression test coverage for
when and how the object_access_hook is invoked, so no additional
coverage is included here, either. Adding regression test
coverage seems like another patch to be submitted separately.
---
src/backend/commands/amcmds.c | 5 +++++
src/backend/commands/foreigncmds.c | 3 +++
src/backend/commands/statscmds.c | 4 ++++
src/backend/rewrite/rewriteDefine.c | 2 ++
4 files changed, 14 insertions(+)
diff --git a/src/backend/commands/amcmds.c b/src/backend/commands/amcmds.c
index 7546378bbb..1ecad090ee 100644
--- a/src/backend/commands/amcmds.c
+++ b/src/backend/commands/amcmds.c
@@ -18,6 +18,7 @@
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
+#include "catalog/objectaccess.h"
#include "catalog/pg_am.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
@@ -107,6 +108,8 @@ CreateAccessMethod(CreateAmStmt *stmt)
recordDependencyOnCurrentExtension(&myself, false);
+ InvokeObjectPostCreateHook(AccessMethodRelationId, amoid, 0);
+
table_close(rel, RowExclusiveLock);
return myself;
@@ -134,6 +137,8 @@ RemoveAccessMethodById(Oid amOid)
CatalogTupleDelete(relation, &tup->t_self);
+ InvokeObjectDropHook(AccessMethodRelationId, amOid, 0);
+
ReleaseSysCache(tup);
table_close(relation, RowExclusiveLock);
diff --git a/src/backend/commands/foreigncmds.c b/src/backend/commands/foreigncmds.c
index f197869752..a399ab4de9 100644
--- a/src/backend/commands/foreigncmds.c
+++ b/src/backend/commands/foreigncmds.c
@@ -1343,6 +1343,9 @@ AlterUserMapping(AlterUserMappingStmt *stmt)
CatalogTupleUpdate(rel, &tp->t_self, tp);
+ InvokeObjectPostAlterHook(UserMappingRelationId,
+ umId, 0);
+
ObjectAddressSet(address, UserMappingRelationId, umId);
heap_freetuple(tp);
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 988cdba6f5..08d0da1109 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -374,6 +374,8 @@ CreateStatistics(CreateStatsStmt *stmt)
relation_close(datarel, RowExclusiveLock);
+ InvokeObjectPostCreateHook(StatisticExtRelationId, statoid, 0);
+
/*
* Invalidate relcache so that others see the new statistics object.
*/
@@ -568,6 +570,8 @@ RemoveStatisticsById(Oid statsOid)
CatalogTupleDelete(relation, &tup->t_self);
+ InvokeObjectDropHook(StatisticExtRelationId, statsOid, 0);
+
ReleaseSysCache(tup);
table_close(relation, RowExclusiveLock);
diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c
index afc78b3316..9989df1107 100644
--- a/src/backend/rewrite/rewriteDefine.c
+++ b/src/backend/rewrite/rewriteDefine.c
@@ -1003,6 +1003,8 @@ RenameRewriteRule(RangeVar *relation, const char *oldName,
CatalogTupleUpdate(pg_rewrite_desc, &ruletup->t_self, ruletup);
+ InvokeObjectPostAlterHook(RewriteRelationId, ruleOid, 0);
+
heap_freetuple(ruletup);
table_close(pg_rewrite_desc, RowExclusiveLock);
--
2.21.1 (Apple Git-122.3)
^ permalink raw reply [nested|flat] 976+ messages in thread
* Re: Adding missing object access hook invocations
2020-03-16 23:03 Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-17 18:49 ` Re: Adding missing object access hook invocations Andres Freund <[email protected]>
2020-03-17 19:39 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-18 04:33 ` Re: Adding missing object access hook invocations Michael Paquier <[email protected]>
2020-03-18 14:50 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
@ 2020-03-19 18:17 ` Alvaro Herrera <[email protected]>
2020-03-19 18:30 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
0 siblings, 1 reply; 976+ messages in thread
From: Alvaro Herrera @ 2020-03-19 18:17 UTC (permalink / raw)
To: Mark Dilger <[email protected]>; +Cc: Michael Paquier <[email protected]>; Andres Freund <[email protected]>; [email protected] <[email protected]>
On 2020-Mar-18, Mark Dilger wrote:
> Here is the latest patch.
So you insist in keeping the Drop hook calls?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 976+ messages in thread
* Re: Adding missing object access hook invocations
2020-03-16 23:03 Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-17 18:49 ` Re: Adding missing object access hook invocations Andres Freund <[email protected]>
2020-03-17 19:39 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-18 04:33 ` Re: Adding missing object access hook invocations Michael Paquier <[email protected]>
2020-03-18 14:50 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-19 18:17 ` Re: Adding missing object access hook invocations Alvaro Herrera <[email protected]>
@ 2020-03-19 18:30 ` Mark Dilger <[email protected]>
2020-03-19 18:47 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
0 siblings, 1 reply; 976+ messages in thread
From: Mark Dilger @ 2020-03-19 18:30 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; +Cc: Michael Paquier <[email protected]>; Andres Freund <[email protected]>; [email protected] <[email protected]>
> On Mar 19, 2020, at 11:17 AM, Alvaro Herrera <[email protected]> wrote:
>
> On 2020-Mar-18, Mark Dilger wrote:
>
>> Here is the latest patch.
>
> So you insist in keeping the Drop hook calls?
My apologies, not at all. I appear to have attached the wrong patch. Will post v3 shortly.
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 976+ messages in thread
* Re: Adding missing object access hook invocations
2020-03-16 23:03 Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-17 18:49 ` Re: Adding missing object access hook invocations Andres Freund <[email protected]>
2020-03-17 19:39 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-18 04:33 ` Re: Adding missing object access hook invocations Michael Paquier <[email protected]>
2020-03-18 14:50 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-19 18:17 ` Re: Adding missing object access hook invocations Alvaro Herrera <[email protected]>
2020-03-19 18:30 ` Re: Adding missing object access hook invocations Mark Dilger <[email protected]>
@ 2020-03-19 18:47 ` Mark Dilger <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Mark Dilger @ 2020-03-19 18:47 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; +Cc: Michael Paquier <[email protected]>; Andres Freund <[email protected]>; [email protected] <[email protected]>
> On Mar 19, 2020, at 11:30 AM, Mark Dilger <[email protected]> wrote:
>
> Will post v3 shortly.
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
[application/octet-stream] v3-0001-Adding-missing-Object-Access-hook-invocations.patch (3.0K, ../../[email protected]/2-v3-0001-Adding-missing-Object-Access-hook-invocations.patch)
download | inline diff:
From 90119a3ea6dfa6ca28d02c30dbdce370e8f0a3a6 Mon Sep 17 00:00:00 2001
From: Mark Dilger <[email protected]>
Date: Thu, 19 Mar 2020 11:35:09 -0700
Subject: [PATCH v3] Adding missing Object Access hook invocations.
There appears to be no reason for skipping the invocation of the
object access hook infrastructure for the following commands, yet they
were lacking the InvokeObjectPost{Create,Alter}Hook calls that would
be expected:
ALTER RULE
ALTER USER MAPPING
CREATE ACCESS METHOD
CREATE STATISTICS
There doesn't seem to be any good regression test coverage for when
and how the object_access_hook is invoked, so no additional coverage
is included here, either. Adding regression test coverage seems like
another patch to be submitted separately.
---
src/backend/commands/amcmds.c | 3 +++
src/backend/commands/foreigncmds.c | 3 +++
src/backend/commands/statscmds.c | 2 ++
src/backend/rewrite/rewriteDefine.c | 2 ++
4 files changed, 10 insertions(+)
diff --git a/src/backend/commands/amcmds.c b/src/backend/commands/amcmds.c
index 7546378bbb..b884bfa0b0 100644
--- a/src/backend/commands/amcmds.c
+++ b/src/backend/commands/amcmds.c
@@ -18,6 +18,7 @@
#include "catalog/catalog.h"
#include "catalog/dependency.h"
#include "catalog/indexing.h"
+#include "catalog/objectaccess.h"
#include "catalog/pg_am.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
@@ -107,6 +108,8 @@ CreateAccessMethod(CreateAmStmt *stmt)
recordDependencyOnCurrentExtension(&myself, false);
+ InvokeObjectPostCreateHook(AccessMethodRelationId, amoid, 0);
+
table_close(rel, RowExclusiveLock);
return myself;
diff --git a/src/backend/commands/foreigncmds.c b/src/backend/commands/foreigncmds.c
index f197869752..a399ab4de9 100644
--- a/src/backend/commands/foreigncmds.c
+++ b/src/backend/commands/foreigncmds.c
@@ -1343,6 +1343,9 @@ AlterUserMapping(AlterUserMappingStmt *stmt)
CatalogTupleUpdate(rel, &tp->t_self, tp);
+ InvokeObjectPostAlterHook(UserMappingRelationId,
+ umId, 0);
+
ObjectAddressSet(address, UserMappingRelationId, umId);
heap_freetuple(tp);
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 988cdba6f5..d30059d043 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -374,6 +374,8 @@ CreateStatistics(CreateStatsStmt *stmt)
relation_close(datarel, RowExclusiveLock);
+ InvokeObjectPostCreateHook(StatisticExtRelationId, statoid, 0);
+
/*
* Invalidate relcache so that others see the new statistics object.
*/
diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c
index afc78b3316..9989df1107 100644
--- a/src/backend/rewrite/rewriteDefine.c
+++ b/src/backend/rewrite/rewriteDefine.c
@@ -1003,6 +1003,8 @@ RenameRewriteRule(RangeVar *relation, const char *oldName,
CatalogTupleUpdate(pg_rewrite_desc, &ruletup->t_self, ruletup);
+ InvokeObjectPostAlterHook(RewriteRelationId, ruleOid, 0);
+
heap_freetuple(ruletup);
table_close(pg_rewrite_desc, RowExclusiveLock);
--
2.21.1 (Apple Git-122.3)
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
* [PATCH] Do not push the active snapshot for copy_table_data before it's needed.
@ 2026-04-10 10:17 Antonin Houska <[email protected]>
0 siblings, 0 replies; 976+ messages in thread
From: Antonin Houska @ 2026-04-10 10:17 UTC (permalink / raw)
make_new_heap() can launch parallel workers when building index on TOAST
relation. If the snapshot for copy_table_data() is already the active
snapshot, the workers can incorrectly consider it their transaction snapshot.
---
src/backend/commands/repack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/commands/repack.c b/src/backend/commands/repack.c
index 58e3867246f..08fd132a4e3 100644
--- a/src/backend/commands/repack.c
+++ b/src/backend/commands/repack.c
@@ -1013,8 +1013,6 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
* Wait until the worker has the initial snapshot and retrieve it.
*/
snapshot = get_initial_snapshot(decoding_worker);
-
- PushActiveSnapshot(snapshot);
}
/* for CLUSTER or REPACK USING INDEX, mark the index as the one to use */
@@ -1038,6 +1036,8 @@ rebuild_relation(Relation OldHeap, Relation index, bool verbose,
NewHeap = table_open(OIDNewHeap, NoLock);
/* Copy the heap data into the new table in the desired order */
+ if (snapshot)
+ PushActiveSnapshot(snapshot);
copy_table_data(NewHeap, OldHeap, index, snapshot, verbose,
&swap_toast_by_content, &frozenXid, &cutoffMulti);
--
2.47.3
--=-=-=--
^ permalink raw reply [nested|flat] 976+ messages in thread
end of thread, other threads:[~2026-04-10 10:17 UTC | newest]
Thread overview: 976+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 23:03 Adding missing object access hook invocations Mark Dilger <[email protected]>
2020-03-17 00:14 ` Alvaro Herrera <[email protected]>
2020-03-17 00:58 ` Mark Dilger <[email protected]>
2020-03-17 18:49 ` Andres Freund <[email protected]>
2020-03-17 19:39 ` Mark Dilger <[email protected]>
2020-03-18 04:33 ` Michael Paquier <[email protected]>
2020-03-18 14:50 ` Mark Dilger <[email protected]>
2020-03-19 18:17 ` Alvaro Herrera <[email protected]>
2020-03-19 18:30 ` Mark Dilger <[email protected]>
2020-03-19 18:47 ` Mark Dilger <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
2026-04-10 10:17 [PATCH] Do not push the active snapshot for copy_table_data before it's needed. Antonin Houska <[email protected]>
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