Re: lwlocks and starvation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: lwlocks and starvation
Date: 2004-11-24 16:19:12
Message-ID: 9843.1101313152@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Neil Conway <neilc(at)samurai(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-11-24 16:20:57 Re: lwlocks and starvation
Previous Message Tom Lane 2004-11-24 16:17:36 Re: lwlocks and starvation