Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit48cc59e

Browse files
committed
Use standard compare_exchange loop style in ProcArrayGroupClearXid().
Besides style, this might improve performance in the contended case.Reviewed by Amit Kapila.Discussion:https://postgr.es/m/20191015035348.GA4166224@rfd.leadboat.com
1 parent30ee5d1 commit48cc59e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/storage/ipc/procarray.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,9 +493,9 @@ ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid)
493493
/* Add ourselves to the list of processes needing a group XID clear. */
494494
proc->procArrayGroupMember= true;
495495
proc->procArrayGroupMemberXid=latestXid;
496+
nextidx=pg_atomic_read_u32(&procglobal->procArrayGroupFirst);
496497
while (true)
497498
{
498-
nextidx=pg_atomic_read_u32(&procglobal->procArrayGroupFirst);
499499
pg_atomic_write_u32(&proc->procArrayGroupNext,nextidx);
500500

501501
if (pg_atomic_compare_exchange_u32(&procglobal->procArrayGroupFirst,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp