Re: lwlocks and starvation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: lwlocks and starvation
Date
Msg-id 9843.1101313152@sss.pgh.pa.us
Whole thread Raw
In response to Re: lwlocks and starvation  (Neil Conway <neilc@samurai.com>)
Responses Re: lwlocks and starvation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> AFAICS, that is not the case. See lwlock.c, circa line 264: in LW_SHARED 
> mode, we check if "exclusive" is zero; if so, we acquire the lock 
> (increment the shared lock count and do not block). And "exclusive" is 
> set non-zero only when we _acquire_ a lock in exclusive mode, not when 
> we add an exclusive waiter to the wait queue.

Ooh, you are right.  I think that may qualify as a bug ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: lwlocks and starvation
Next
From: Tom Lane
Date:
Subject: Re: lwlocks and starvation