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

From Qingqing Zhou
Subject Re: pgsql: Repair a low-probability race condition identified by Qingqing
Date
Msg-id e21mbf$ktr$1@news.hub.org
Whole thread Raw
In response to pgsql: Repair a low-probability race condition identified by Qingqing  (tgl@postgresql.org (Tom Lane))
Responses Re: pgsql: Repair a low-probability race condition identified by Qingqing  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
"Tom Lane" <tgl@postgresql.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



pgsql-committers by date:

Previous
From: momjian@postgresql.org (Bruce Momjian)
Date:
Subject: pgsql: Document that errors are not output by log_statement (was they
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Repair a low-probability race condition identified by Qingqing