Обсуждение: pgsql: Convert the PGPROC->lwWaitLink list into a dlist instead of open

Поиск
Список
Период
Сортировка

pgsql: Convert the PGPROC->lwWaitLink list into a dlist instead of open

От
Andres Freund
Дата:
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7882c3b0b95640e361f1533fe0f2d02e4e5d8610

Modified Files
--------------
src/backend/access/transam/twophase.c |    1 -
src/backend/storage/lmgr/lwlock.c     |  146 ++++++++++++---------------------
src/backend/storage/lmgr/proc.c       |    2 -
src/include/storage/lwlock.h          |    5 +-
src/include/storage/proc.h            |    3 +-
5 files changed, 57 insertions(+), 100 deletions(-)