On Wed, Feb 5, 2020 at 9:42 AM Dilip Kumar <dilipbal...@gmail.com> wrote: > > > > > I am not able to understand the change in > > v8-0011-BUGFIX-set-final_lsn-for-subxacts-before-cleanup. Do you have > > any explanation for the same? > > It appears that in ReorderBufferCommitChild we are always setting the > final_lsn of the subxacts so it should not be invalid. For testing, I > have changed this as an assert and checked but it never hit. So maybe > we can remove this change. >
Tomas, do you remember anything about this change? We are talking about below change: From: Tomas Vondra <t...@fuzzy.cz> Date: Thu, 26 Sep 2019 19:14:45 +0200 Subject: [PATCH v8 11/13] BUGFIX: set final_lsn for subxacts before cleanup --- src/backend/replication/logical/reorderbuffer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index fe4e57c..beb6cd2 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -1327,6 +1327,10 @@ ReorderBufferCleanupTXN(ReorderBuffer *rb, ReorderBufferTXN *txn) subtxn = dlist_container(ReorderBufferTXN, node, iter.cur); + /* make sure subtxn has final_lsn */ + if (subtxn->final_lsn == InvalidXLogRecPtr) + subtxn->final_lsn = txn->final_lsn; + -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com