Re: pgsql: Repair a low-probability race condition identified by Qingqing

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Repair a low-probability race condition identified by Qingqing
Date: 2006-04-18 03:24:05
Message-ID: e21mbf$ktr$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers


"Tom Lane" <tgl(at)postgresql(dot)org> wrote
> Rather than try to prevent the race condition directly, it seems best
> to make the lock manager robust against leftover wakeups, by having it
> repeat waiting on the semaphore if the lock has not actually been granted
> or denied yet.
>

IMHO the lmgr will not be the murdered by the leftover wakeup, but what
about the next LockBufferForCleanUp()? It is possible that the the leftover
wakeup is still there (e.g. get the lock without any waiting) and it will
wake up prematurely?

Regards,
Qingqing

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2006-04-18 03:47:37 Re: pgsql: Repair a low-probability race condition identified by Qingqing
Previous Message Bruce Momjian 2006-04-18 00:52:42 pgsql: Document that errors are not output by log_statement (was they