pgsql: Fix WakeupWaiters() to not wake up an exclusive locker unnecessa

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix WakeupWaiters() to not wake up an exclusive locker unnecessa
Date: 2014-02-10 13:27:04
Message-ID: E1WCqt6-0004qv-Ld@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix WakeupWaiters() to not wake up an exclusive locker unnecessarily.

WakeupWaiters() is supposed to wake up all LW_WAIT_UNTIL_FREE waiters of
the slot, but the loop incorrectly also woke up the first LW_EXCLUSIVE
waiter, if there was no LW_WAIT_UNTIL_FREE waiters in the queue.

Noted by Andres Freund. This code is new in 9.4, so no backpatching.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d699ba41349e4ef397222a7223606fa03f4c4870

Modified Files
--------------
src/backend/access/transam/xlog.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-02-11 01:49:07 pgsql: Don't generate plain-text HISTORY and src/test/regress/README an
Previous Message Heikki Linnakangas 2014-02-10 08:02:18 pgsql: Use memmove() instead of memcpy() for copying overlapping region