Re: [HACKERS] logical decoding of two-phase transactions - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [HACKERS] logical decoding of two-phase transactions
Date
Msg-id CAA4eK1KWiRAUSb_wSvT4pPky7w-UUzht=LYuTBweDGZ41fqkzw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] logical decoding of two-phase transactions  (Ajin Cherian <itsajin@gmail.com>)
List pgsql-hackers
On Mon, Sep 21, 2020 at 12:36 PM Ajin Cherian <itsajin@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.



pgsql-hackers by date:

Previous
From: Ashutosh Sharma
Date:
Subject: Logical replication from PG v13 and below to PG v14 (devel version) is not working.
Next
From: Dilip Kumar
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions