Skip to content

Commit ade89ba

Browse files
author
Amit Kapila
committed
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 a271a1b. Reported-by: Markus Wanner Discussion: https://postgr.es/m/dbec82e2-dbd7-95a2-c6b6-e488cbbdf853@bluegap.ch
1 parent bc617a7 commit ade89ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/replication/logical/reorderbuffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2679,7 +2679,7 @@ ReorderBufferFinishPrepared(ReorderBuffer *rb, TransactionId xid,
26792679
XLogRecPtr prepare_end_lsn;
26802680
TimestampTz prepare_time;
26812681

2682-
txn = ReorderBufferTXNByXid(rb, xid, true, NULL, commit_lsn, false);
2682+
txn = ReorderBufferTXNByXid(rb, xid, false, NULL, commit_lsn, false);
26832683

26842684
/* unknown transaction, nothing to do */
26852685
if (txn == NULL)

0 commit comments

Comments
 (0)