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

From Andres Freund
Subject pgsql: Convert the PGPROC->lwWaitLink list into a dlist instead of open
Date
Msg-id E1Y4Bau-0005fS-D8@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Move pg_lzcompress.c to src/common.
Next
From: Andres Freund
Date:
Subject: pgsql: Add capability to suppress CONTEXT: messages to elog machinery.