summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmit Kapila2021-02-23 04:17:41 +0000
committerAmit Kapila2021-02-23 04:17:41 +0000
commitade89ba5f408e6034db7cc8a2c9b7858f5a214c4 (patch)
treefcdf6dd5235d1b77aa68db853f1227ddc0fe14b2 /src
parentbc617a7b1cada2ec5f8b9d45a4312e49fc1766ad (diff)
Fix an oversight in ReorderBufferFinishPrepared.
We don't have anything to decode in a transaction if ReorderBufferTXN doesn't exist by the time we decode the commit prepared. So don't create a new ReorderBufferTXN here. This is an oversight in commit a271a1b5. Reported-by: Markus Wanner Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/reorderbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 5a62ab8bbc1..66554ca2d98 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -2679,7 +2679,7 @@ ReorderBufferFinishPrepared(ReorderBuffer *rb, TransactionId xid,
XLogRecPtr prepare_end_lsn;
TimestampTz prepare_time;
- txn = ReorderBufferTXNByXid(rb, xid, true, NULL, commit_lsn, false);
+ txn = ReorderBufferTXNByXid(rb, xid, false, NULL, commit_lsn, false);
/* unknown transaction, nothing to do */
if (txn == NULL)