pgsql: Replace CAS loop with single TAS in ProcArrayGroupClearXid()

From: Alexander Korotkov <akorotkov(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Replace CAS loop with single TAS in ProcArrayGroupClearXid()
Date: 2018-09-22 13:27:50
Message-ID: E1g3hws-0003yk-2r@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Replace CAS loop with single TAS in ProcArrayGroupClearXid()

Single pg_atomic_exchange_u32() is expected to be faster than loop of
pg_atomic_compare_exchange_u32(). Also, it would be consistent with
clog group update code.

Discussion: https://postgr.es/m/CAPpHfdtxLsC-bqfxFcHswZ91OxXcZVNDBBVfg9tAWU0jvn1tQA%40mail.gmail.com
Reviewed-by: Amit Kapila

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2f39106a209e647d7b1895331fca115f9bb6ec8d

Modified Files
--------------
src/backend/storage/ipc/procarray.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-09-23 20:06:06 pgsql: Fix failure in WHERE CURRENT OF after rewinding the referenced c
Previous Message Michael Paquier 2018-09-22 06:26:29 pgsql: Make GUC wal_sender_timeout user-settable