index 3425e7494bceb2b9ffbb26530907be66b98f63cc..bd3c7a47fe21949ba63da26f0d692b2ee618f885 100644 (file)
@@ -840,12 +840,12 @@ ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid)
/* Walk the list and clear all XIDs. */
while (nextidx != INVALID_PGPROCNO)
{
- PGPROC *proc = &allProcs[nextidx];
+ PGPROC *nextproc = &allProcs[nextidx];
- ProcArrayEndTransactionInternal(proc, proc->procArrayGroupMemberXid);
+ ProcArrayEndTransactionInternal(nextproc, nextproc->procArrayGroupMemberXid);
/* Move to next proc in list. */
- nextidx = pg_atomic_read_u32(&proc->procArrayGroupNext);
+ nextidx = pg_atomic_read_u32(&nextproc->procArrayGroupNext);
}
/* We're done with the lock now. */
@@ -860,18 +860,18 @@ ProcArrayGroupClearXid(PGPROC *proc, TransactionId latestXid)
*/
while (wakeidx != INVALID_PGPROCNO)
{
- PGPROC *proc = &allProcs[wakeidx];
+ PGPROC *nextproc = &allProcs[wakeidx];
- wakeidx = pg_atomic_read_u32(&proc->procArrayGroupNext);
- pg_atomic_write_u32(&proc->procArrayGroupNext, INVALID_PGPROCNO);
+ wakeidx = pg_atomic_read_u32(&nextproc->procArrayGroupNext);
+ pg_atomic_write_u32(&nextproc->procArrayGroupNext, INVALID_PGPROCNO);
/* ensure all previous writes are visible before follower continues. */
pg_write_barrier();
- proc->procArrayGroupMember = false;
+ nextproc->procArrayGroupMember = false;
- if (proc != MyProc)
- PGSemaphoreUnlock(proc->sem);
+ if (nextproc != MyProc)
+ PGSemaphoreUnlock(nextproc->sem);
}
}