aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2015-11-08 23:01:53 +0100
committerAndres Freund <andres@anarazel.de>2015-11-09 00:03:35 +0100
commit04c0b63365c7d4ee584300737afe6ef7df3b1253 (patch)
treee10897c08959fbb2e14439c04387a62155f49029 /src
parent40c28678aa65308f27347cd218a09fdc92c483ef (diff)
downloadpostgresql-04c0b63365c7d4ee584300737afe6ef7df3b1253.tar.gz
postgresql-04c0b63365c7d4ee584300737afe6ef7df3b1253.zip
Set replication origin when decoding commit records.
By accident the replication origin was not set properly in DecodeCommit(). That's bad because the origin is passed to the output plugins origin filter, and accessible from the output plugin via ReorderBufferTXN->origin_id. Accessing the origin of individual changes worked before the fix, which is why this wasn't notices earlier. Reported-By: Craig Ringer Author: Craig Ringer Discussion: CAMsr+YFhBJLp=qfSz3-J+0P1zLkE8zNXM2otycn20QRMx380gw@mail.gmail.com Backpatch: 9.5, where replication origins where introduced
Diffstat (limited to 'src')
-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 c629da317eb..9f606875c86 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -450,7 +450,7 @@ DecodeCommit(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
{
XLogRecPtr origin_lsn = InvalidXLogRecPtr;
XLogRecPtr commit_time = InvalidXLogRecPtr;
- XLogRecPtr origin_id = InvalidRepOriginId;
+ XLogRecPtr origin_id = XLogRecGetOrigin(buf->record);
int i;
if (parsed->xinfo & XACT_XINFO_HAS_ORIGIN)