On Mon, Sep 21, 2020 at 12:36 PM Ajin Cherian <itsa...@gmail.com> wrote: > > > Why can't we call ReorderBufferCleanupTXN() from > > ReorderBufferFinishPrepared after your changes? > > > > Since the truncate already removed the changes, it would fail on the > below Assert in ReorderBufferCleanupTXN() > /* Check we're not mixing changes from different transactions. */ > Assert(change->txn == txn); >
The changes list should be empty by that time because we removing each change from the list:, see code "dlist_delete(&change->node);" in ReorderBufferTruncateTXN. If you are hitting the Assert as you mentioned then I think the problem is something else. -- With Regards, Amit Kapila.