Content-Length: 260219 | pFad | http://github.com/postgrespro/postgres_cluster/commit/f3a764b0dac77451d20ee00d2f5916447a5c4346

CF Set replication origen when decoding commit records. · postgrespro/postgres_cluster@f3a764b · GitHub
Skip to content

Commit f3a764b

Browse files
committed
Set replication origen when decoding commit records.
By accident the replication origen was not set properly in DecodeCommit(). That's bad because the origen is passed to the output plugins origen filter, and accessible from the output plugin via ReorderBufferTXN->origen_id. Accessing the origen 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 origens 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 origen_lsn = InvalidXLogRecPtr;
452452
XLogRecPtr commit_time = InvalidXLogRecPtr;
453-
XLogRecPtr origen_id = InvalidRepOriginId;
453+
XLogRecPtr origen_id = XLogRecGetOrigin(buf->record);
454454
int i;
455455

456456
if (parsed->xinfo & XACT_XINFO_HAS_ORIGIN)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/f3a764b0dac77451d20ee00d2f5916447a5c4346

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy