fix_PushTransaction.patch

application/octet-stream

Filename: fix_PushTransaction.patch
Type: application/octet-stream
Part: 0
Message: Re:BUG #18241: PushTransaction may cause Standby to execute ItemIdMarkDead

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: unified
File+
src/backend/access/transam/xact.c 7 0
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 536edb3792..b9787d480f 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -5302,6 +5302,13 @@ PushTransaction(void)
 	s->parallelModeLevel = 0;
 	s->topXidLogged = false;
 
+	/*
+	 * A correct value must be assigned to startedInRecovery, otherwise the
+	 * index scan on Standby may mark the index item as dead.
+	 * For details, please view the comments of RelationGetIndexScan.
+	 */
+	s->startedInRecovery = p->startedInRecovery;
+
 	CurrentTransactionState = s;
 
 	/*