aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-05-16 10:53:10 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-05-16 10:53:10 +0300
commit03e2b1017c0d360cae0b4d0a8bf5d6924536c834 (patch)
tree17cd17dc9f4bd16d5886392b1e7f137ff53ad3eb
parente7873b74d9c1bb7a325960f52043db6de88e6e66 (diff)
downloadpostgresql-03e2b1017c0d360cae0b4d0a8bf5d6924536c834.tar.gz
postgresql-03e2b1017c0d360cae0b4d0a8bf5d6924536c834.zip
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.
-rw-r--r--src/backend/replication/logical/decode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index 7b6114a2097..cc736521c2a 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);