v10-0004-PoC-fix-clear-xid.patch

application/octet-stream

Filename: v10-0004-PoC-fix-clear-xid.patch
Type: application/octet-stream
Part: 0
Message: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v10-0004
Subject: PoC fix clear xid
File+
src/backend/access/transam/xact.c 2 1
From 675e62c23535c6c4daf385383a6bc2f3569cf6eb Mon Sep 17 00:00:00 2001
From: Andrey Borodin <amborodin@acm.org>
Date: Sat, 7 Aug 2021 20:27:14 +0500
Subject: [PATCH v10 4/4] PoC fix clear xid

---
 src/backend/access/transam/xact.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 441445927e..b24a3de8d4 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -2500,7 +2500,6 @@ PrepareTransaction(void)
 	 * done *after* the prepared transaction has been marked valid, else
 	 * someone may think it is unlocked and recyclable.
 	 */
-	ProcArrayClearTransaction(MyProc);
 
 	/*
 	 * In normal commit-processing, this is all non-critical post-transaction
@@ -2535,6 +2534,8 @@ PrepareTransaction(void)
 	PostPrepare_MultiXact(xid);
 
 	PostPrepare_Locks(xid);
+
+	ProcArrayClearTransaction(MyProc);
 	PostPrepare_PredicateLocks(xid);
 
 	ResourceOwnerRelease(TopTransactionResourceOwner,
-- 
2.24.3 (Apple Git-128)