Re: Use proc instead of MyProc in ProcArrayGroupClearXid()/TransactionGroupUpdateXidStatus()

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: rajesh singarapu <rajesh(dot)rs0541(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use proc instead of MyProc in ProcArrayGroupClearXid()/TransactionGroupUpdateXidStatus()
Date: 2022-11-08 06:28:35
Message-ID: CAA4eK1+LVWe=oPOQfM8=0Y5RwiiVU1Dr3j+9GhC7kMuRoAz1mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 7, 2022 at 3:17 PM rajesh singarapu <rajesh(dot)rs0541(at)gmail(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message sirisha chamarthi 2022-11-08 06:37:49 Re: Reviving lost replication slots
Previous Message Bharath Rupireddy 2022-11-08 06:26:13 Re: Use proc instead of MyProc in ProcArrayGroupClearXid()/TransactionGroupUpdateXidStatus()