mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
snapshot scalability: Move PGXACT->vacuumFlags to ProcGlobal->vacuumFlags.
Similar to the previous commit this increases the chance that data frequently needed by GetSnapshotData() stays in l2 cache. As we now take care to not unnecessarily write to ProcGlobal->vacuumFlags, there should be very few modifications to the ProcGlobal->vacuumFlags array. Author: Andres Freund <andres@anarazel.de> Reviewed-By: Robert Haas <robertmhaas@gmail.com> Reviewed-By: Thomas Munro <thomas.munro@gmail.com> Reviewed-By: David Rowley <dgrowleyml@gmail.com> Discussion: https://postgr.es/m/20200301083601.ews6hz5dduc3w2se@alap3.anarazel.de
This commit is contained in:
@@ -544,7 +544,6 @@ FindLockCycleRecurseMember(PGPROC *checkProc,
|
||||
{
|
||||
PGPROC *proc;
|
||||
LOCK *lock = checkProc->waitLock;
|
||||
PGXACT *pgxact;
|
||||
PROCLOCK *proclock;
|
||||
SHM_QUEUE *procLocks;
|
||||
LockMethod lockMethodTable;
|
||||
@@ -582,7 +581,6 @@ FindLockCycleRecurseMember(PGPROC *checkProc,
|
||||
PGPROC *leader;
|
||||
|
||||
proc = proclock->tag.myProc;
|
||||
pgxact = &ProcGlobal->allPgXact[proc->pgprocno];
|
||||
leader = proc->lockGroupLeader == NULL ? proc : proc->lockGroupLeader;
|
||||
|
||||
/* A proc never blocks itself or any other lock group member */
|
||||
@@ -630,7 +628,7 @@ FindLockCycleRecurseMember(PGPROC *checkProc,
|
||||
* ProcArrayLock.
|
||||
*/
|
||||
if (checkProc == MyProc &&
|
||||
pgxact->vacuumFlags & PROC_IS_AUTOVACUUM)
|
||||
proc->vacuumFlags & PROC_IS_AUTOVACUUM)
|
||||
blocking_autovacuum_proc = proc;
|
||||
|
||||
/* We're done looking at this proclock */
|
||||
|
||||
Reference in New Issue
Block a user