Skip to content

Commit f3a764b

Browse files
committed
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
1 parent fed19f3 commit f3a764b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/replication/logical/decode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ DecodeCommit(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
450450
{
451451
XLogRecPtr origin_lsn = InvalidXLogRecPtr;
452452
XLogRecPtr commit_time = InvalidXLogRecPtr;
453-
XLogRecPtr origin_id = InvalidRepOriginId;
453+
XLogRecPtr origin_id = XLogRecGetOrigin(buf->record);
454454
int i;
455455

456456
if (parsed->xinfo & XACT_XINFO_HAS_ORIGIN)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy