Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 03e2b10

Browse files
committed
Fix thinko in logical decoding of commit-prepared records.
The decoding of prepared transaction commits accidentally used the XID of the transaction performing the COMMIT PREPARED, not the XID of the prepared transaction. Before bb38fb0 that lead to those transactions not being decoded, afterwards to a assertion failure.
1 parent e7873b7 commit 03e2b10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/replication/logical/decode.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ DecodeXactOp(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
225225
subxacts = (TransactionId *) &(xlrec->xnodes[xlrec->nrels]);
226226
invals = (SharedInvalidationMessage *) &(subxacts[xlrec->nsubxacts]);
227227

228-
DecodeCommit(ctx, buf, r->xl_xid, xlrec->dbId,
228+
DecodeCommit(ctx, buf, prec->xid, xlrec->dbId,
229229
xlrec->xact_time,
230230
xlrec->nsubxacts, subxacts,
231231
xlrec->nmsgs, invals);

0 commit comments

Comments
 (0)