mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Convert the PGPROC->lwWaitLink list into a dlist instead of open coding it.
Besides being shorter and much easier to read it changes the logic in LWLockRelease() to release all shared lockers when waking up any. This can yield some significant performance improvements - and the fairness isn't really much worse than before, as we always allowed new shared lockers to jump the queue.
This commit is contained in:
@@ -372,7 +372,6 @@ InitProcess(void)
|
||||
MyPgXact->vacuumFlags |= PROC_IS_AUTOVACUUM;
|
||||
MyProc->lwWaiting = false;
|
||||
MyProc->lwWaitMode = 0;
|
||||
MyProc->lwWaitLink = NULL;
|
||||
MyProc->waitLock = NULL;
|
||||
MyProc->waitProcLock = NULL;
|
||||
#ifdef USE_ASSERT_CHECKING
|
||||
@@ -535,7 +534,6 @@ InitAuxiliaryProcess(void)
|
||||
MyPgXact->vacuumFlags = 0;
|
||||
MyProc->lwWaiting = false;
|
||||
MyProc->lwWaitMode = 0;
|
||||
MyProc->lwWaitLink = NULL;
|
||||
MyProc->waitLock = NULL;
|
||||
MyProc->waitProcLock = NULL;
|
||||
#ifdef USE_ASSERT_CHECKING
|
||||
|
||||
Reference in New Issue
Block a user