Re: BUG #5036: Advisory locks have unexpected behavior

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #5036: Advisory locks have unexpected behavior
Дата
Msg-id 20090904155055.GF5603@alvh.no-ip.org
обсуждение исходный текст
Ответ на BUG #5036: Advisory locks have unexpected behavior  ("Dennis Seran" <dseran@novonics.com>)
Ответы Re: BUG #5036: Advisory locks have unexpected behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Dennis Seran wrote:

> - Client B again prompts the command pg_try_advisory_lock_shared(12345) in
> an attempt to reobtain the shared lock(12345) but returns false and fails to
> obtain the shared lock (SHOULDN'T THIS CLIENT BE ABLE TO OBTAIN THE SHARED
> LOCK?)

No; it gets to sleep until after client C has released the exclusive
lock.  Otherwise a constant stream of shared lockers would starvate
exclusive lockers.

> - The above result happens when all 3 clients are on the same machine.  If
> the same steps were followed, but this time with clients A and B on a RHEL
> machine and the client C and the server on an XP machine, the result is a
> bit different.  The above step results in Client B going into the queue as
> well as Client C even though Client A currently holds the shared lock.
> (AGAIN, SHOULDN'T THIS CLIENT BE ABLE TO OBTAIN THE SHARED LOCK?)

I think this sounds like a bug.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: BUG #5028: CASE returns ELSE value always when type is "char"
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: BUG #5028: CASE returns ELSE value always when type is "char"