Re: Add macros for ReorderBufferTXN toptxn - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Add macros for ReorderBufferTXN toptxn
Date
Msg-id CAA4eK1+oqfUSC3vpu6bJzgfnSmu_yaeoLS=Rb3416GuS5iRP1Q@mail.gmail.com
Whole thread Raw
In response to Re: Add macros for ReorderBufferTXN toptxn  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
On Tue, Mar 14, 2023 at 5:03 PM vignesh C <vignesh21@gmail.com> wrote:
>
> On Tue, 14 Mar 2023 at 12:37, Peter Smith <smithpb2250@gmail.com> wrote:
> >
>
> The same issue exists here too:
> 1)
> -       if (toptxn != NULL && !rbtxn_has_catalog_changes(toptxn))
> +       if (rbtxn_is_subtxn(txn))
>         {
> -               toptxn->txn_flags |= RBTXN_HAS_CATALOG_CHANGES;
> -               dclist_push_tail(&rb->catchange_txns, &toptxn->catchange_node);
> +               ReorderBufferTXN *toptxn = rbtxn_get_toptxn(txn);
>
> 2)
>  -       if (change->txn->toptxn)
> -               topxid = change->txn->toptxn->xid;
> +       if (rbtxn_is_subtxn(change->txn))
> +               topxid = rbtxn_get_toptxn(change->txn)->xid;
>
> If you plan to fix, bothe the above also should be handled.
>

I don't know if it would be any better to change the above two as
compared to what the proposed patch has.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Add macros for ReorderBufferTXN toptxn
Next
From: Juan José Santamaría Flecha
Date:
Subject: Fix fseek() detection of unseekable files on WIN32