Commit 03e2b101 authored by Heikki Linnakangas's avatar Heikki Linnakangas

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 bb38fb0d that lead to those transactions not being
decoded, afterwards to a assertion failure.
parent e7873b74
...@@ -225,7 +225,7 @@ DecodeXactOp(LogicalDecodingContext *ctx, XLogRecordBuffer *buf) ...@@ -225,7 +225,7 @@ DecodeXactOp(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
subxacts = (TransactionId *) &(xlrec->xnodes[xlrec->nrels]); subxacts = (TransactionId *) &(xlrec->xnodes[xlrec->nrels]);
invals = (SharedInvalidationMessage *) &(subxacts[xlrec->nsubxacts]); invals = (SharedInvalidationMessage *) &(subxacts[xlrec->nsubxacts]);
DecodeCommit(ctx, buf, r->xl_xid, xlrec->dbId, DecodeCommit(ctx, buf, prec->xid, xlrec->dbId,
xlrec->xact_time, xlrec->xact_time,
xlrec->nsubxacts, subxacts, xlrec->nsubxacts, subxacts,
xlrec->nmsgs, invals); xlrec->nmsgs, invals);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment