Re: pg_atomic_exchange_u32() in ProcArrayGroupClearXid() - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: pg_atomic_exchange_u32() in ProcArrayGroupClearXid()
Date
Msg-id CAA4eK1+OObaLgGGDnbwFR3S6oFgvAw9XvN2YZ8uFXQ7KzR7T4A@mail.gmail.com
Whole thread Raw
In response to pg_atomic_exchange_u32() in ProcArrayGroupClearXid()  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Responses Re: pg_atomic_exchange_u32() in ProcArrayGroupClearXid()
List pgsql-hackers
On Fri, Sep 21, 2018 at 11:06 PM Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
>
> Hi!
>
> While investigating ProcArrayGroupClearXid() code I wonder why do we have this loop instead of plain
pg_atomic_exchange_u32()call?
 
>

We can use pg_atomic_exchange_u32 instead of a loop.  In fact, clog
code uses pg_atomic_exchange_u32 for the same purpose.  I think it is
better to make the code consistent at both places.  Feel free to
change it, otherwise, I can take care of it in a few days time.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Edmund Horner
Date:
Subject: Re: PATCH: psql tab completion for SELECT
Next
From: Pavel Stehule
Date:
Subject: Re: Proposal for disk quota feature