pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Convert the PGPROC->lwWaitLink list into a dlist instead of open
Date: Thu, 25 Dec 2014 16:49:00 +0000
Message-ID: <E1Y4Bau-0005fS-D8@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (2+ messages)  latest in thread

Message-ID: <E1Y4Bau-0005fS-D8@gemulon.postgresql.org>
Permalink:  ../E1Y4Bau-0005fS-D8@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1Y4Bau-0005fS-D8@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: Convert the PGPROC->lwWaitLink list into a dlist instead of open
  In-Reply-To: <E1Y4Bau-0005fS-D8@gemulon.postgresql.org>
  References: <E1Y4Bau-0005fS-D8@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox