Re: Use proc instead of MyProc in ProcArrayGroupClearXid()/TransactionGroupUpdateXidStatus() - Mailing list pgsql-hackers

From rajesh singarapu
Subject Re: Use proc instead of MyProc in ProcArrayGroupClearXid()/TransactionGroupUpdateXidStatus()
Date
Msg-id CADgiWi6bjr=3KhmfBB7WYOGRY7wrZ4w0p-NF+3MgBGH3b8tAFg@mail.gmail.com
Whole thread Raw
In response to Re: Use proc instead of MyProc in ProcArrayGroupClearXid()/TransactionGroupUpdateXidStatus()  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Thanks Bharat and Amit for the review and explaining rationale.

for the TransactionGroupUpdateXidStatus() change, let me see if I can
piggy back this change on something more valuable.


thanks
Rajesh

On Tue, Nov 8, 2022 at 11:58 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Mon, Nov 7, 2022 at 3:17 PM rajesh singarapu <rajesh.rs0541@gmail.com> wrote:
> >
> > In both TransactionGroupUpdateXidStatus and ProcArrayGroupClearXid
> > global MyProc is used. for consistency, replaced with a function local variable.
> >
>
> In ProcArrayGroupClearXid(), currently, we always pass MyProc as proc,
> so the change suggested by you will work but I think if in the future
> someone calls it with a different proc, then the change suggested by
> you won't work. The change in TransactionGroupUpdateXidStatus() looks
> good but If we don't want to change ProcArrayGroupClearXid() then I am
> not sure if there is much value in making the change in
> TransactionGroupUpdateXidStatus().
>
> --
> With Regards,
> Amit Kapila.



pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Add proper planner support for ORDER BY / DISTINCT aggregates
Next
From: Bharath Rupireddy
Date:
Subject: Re: Reviving lost replication slots