pgsql: Fix WakeupWaiters() to not wake up an exclusive locker unnecessa - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix WakeupWaiters() to not wake up an exclusive locker unnecessa
Date
Msg-id E1WCqt6-0004qv-Ld@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Use memmove() instead of memcpy() for copying overlapping region
Next
From: Tom Lane
Date:
Subject: pgsql: Don't generate plain-text HISTORY and src/test/regress/README an