v12-0005-PoC-fix-clear-xid.patch

application/octet-stream

Filename: v12-0005-PoC-fix-clear-xid.patch
Type: application/octet-stream
Part: 1
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 v12-0005
Subject: PoC fix clear xid
File+
src/backend/access/transam/xact.c 2 1
From 7e47dae2828d88ddb2161fda0c3b08a158c6cf37 Mon Sep 17 00:00:00 2001
From: Andrey Borodin <amborodin@acm.org>
Date: Sat, 7 Aug 2021 20:27:14 +0500
Subject: [PATCH v12 5/6] 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 387f80419a..9b19d939eb 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)