mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Rename PGPROC fields related to group XID clearing again.
Commit0e141c0fbbintroduced a new facility to reduce ProcArrayLock contention by clearing several XIDs from the ProcArray under a single lock acquisition. The names initially chosen were deemed not to be very good choices, so commit4aec49899erenamed them. But now it seems like we still didn't get it right. A pending patch wants to add similar infrastructure for batching CLOG updates, so the names need to be clear enough to allow a new set of structure members with a related purpose. Amit Kapila
This commit is contained in:
@@ -181,7 +181,7 @@ InitProcGlobal(void)
|
||||
ProcGlobal->startupBufferPinWaitBufId = -1;
|
||||
ProcGlobal->walwriterLatch = NULL;
|
||||
ProcGlobal->checkpointerLatch = NULL;
|
||||
pg_atomic_init_u32(&ProcGlobal->firstClearXidElem, INVALID_PGPROCNO);
|
||||
pg_atomic_init_u32(&ProcGlobal->procArrayGroupFirst, INVALID_PGPROCNO);
|
||||
|
||||
/*
|
||||
* Create and initialize all the PGPROC structures we'll need. There are
|
||||
@@ -396,9 +396,9 @@ InitProcess(void)
|
||||
SHMQueueElemInit(&(MyProc->syncRepLinks));
|
||||
|
||||
/* Initialize fields for group XID clearing. */
|
||||
MyProc->clearXid = false;
|
||||
MyProc->backendLatestXid = InvalidTransactionId;
|
||||
pg_atomic_init_u32(&MyProc->nextClearXidElem, INVALID_PGPROCNO);
|
||||
MyProc->procArrayGroupMember = false;
|
||||
MyProc->procArrayGroupMemberXid = InvalidTransactionId;
|
||||
pg_atomic_init_u32(&MyProc->procArrayGroupNext, INVALID_PGPROCNO);
|
||||
|
||||
/* Check that group locking fields are in a proper initial state. */
|
||||
Assert(MyProc->lockGroupLeaderIdentifier == 0);
|
||||
|
||||
Reference in New Issue
Block a user