Hi, While debugging one of the logical decoding issues, I found that xid was not included in restoring reorder buffer changes from disk log messages. Attached a patch for it. I felt including the XID will be helpful in debugging. Thoughts?
Regards, Vignesh
From 9d3ee45b7b2c0d625af888579035a0fb9a1e512c Mon Sep 17 00:00:00 2001 From: vignesh <vignes...@gmail.com> Date: Thu, 29 Apr 2021 21:38:09 +0530 Subject: [PATCH] Included xid in restoring reorder buffer changes from disk. Included xid in restoring reorder buffer changes from disk. --- src/backend/replication/logical/reorderbuffer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index cdf46a36af..b00f7f4801 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -1381,9 +1381,10 @@ ReorderBufferIterTXNNext(ReorderBuffer *rb, ReorderBufferIterTXNState *state) dlist_head_element(ReorderBufferChange, node, &entry->txn->changes); - elog(DEBUG2, "restored %u/%u changes from disk", + elog(DEBUG2, "restored %u/%u changes of XID %u from disk", (uint32) entry->txn->nentries_mem, - (uint32) entry->txn->nentries); + (uint32) entry->txn->nentries, + (uint32) entry->txn->xid); Assert(entry->txn->nentries_mem); /* txn stays the same */ -- 2.25.1