]> granicus.if.org Git - postgresql/commit
Convert the PGPROC->lwWaitLink list into a dlist instead of open coding it.
authorAndres Freund <andres@anarazel.de>
Thu, 25 Dec 2014 16:24:30 +0000 (17:24 +0100)
committerAndres Freund <andres@anarazel.de>
Thu, 25 Dec 2014 16:24:30 +0000 (17:24 +0100)
commit7882c3b0b95640e361f1533fe0f2d02e4e5d8610
tree6136d4cb37fbff3f9fcbc4ca8e1b8e25c12f467c
parent570bd2b3fd20d3f8896f5e6a8133d6aed385ac86
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.
src/backend/access/transam/twophase.c
src/backend/storage/lmgr/lwlock.c
src/backend/storage/lmgr/proc.c
src/include/storage/lwlock.h
src/include/storage/proc.h