From: Heikki Linnakangas Date: Fri, 16 May 2014 07:53:10 +0000 (+0300) Subject: Fix thinko in logical decoding of commit-prepared records. X-Git-Tag: REL9_4_BETA2~177 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03e2b1017c0d360cae0b4d0a8bf5d6924536c834;p=postgresql 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 bb38fb0d43c8d that lead to those transactions not being decoded, afterwards to a assertion failure. --- diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c index 7b6114a209..cc736521c2 100644 --- a/src/backend/replication/logical/decode.c +++ b/src/backend/replication/logical/decode.c @@ -225,7 +225,7 @@ DecodeXactOp(LogicalDecodingContext *ctx, XLogRecordBuffer *buf) subxacts = (TransactionId *) &(xlrec->xnodes[xlrec->nrels]); invals = (SharedInvalidationMessage *) &(subxacts[xlrec->nsubxacts]); - DecodeCommit(ctx, buf, r->xl_xid, xlrec->dbId, + DecodeCommit(ctx, buf, prec->xid, xlrec->dbId, xlrec->xact_time, xlrec->nsubxacts, subxacts, xlrec->nmsgs, invals);