]> granicus.if.org Git - postgresql/commit
Replace CAS loop with single TAS in ProcArrayGroupClearXid()
authorAlexander Korotkov <akorotkov@postgresql.org>
Sat, 22 Sep 2018 13:22:30 +0000 (16:22 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Sat, 22 Sep 2018 13:22:30 +0000 (16:22 +0300)
commit2f39106a209e647d7b1895331fca115f9bb6ec8d
tree5e0dfee59c3ce48a5cd6e5b804d250f8ef784df2
parentdb361db2fce7491303f49243f652c75c084f5a19
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
src/backend/storage/ipc/procarray.c