Re: [HACKERS] 'Waiting on lock'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] 'Waiting on lock'
Дата
Msg-id 7902.1182274324@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] 'Waiting on lock'  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-patches
Gregory Stark <stark@enterprisedb.com> writes:
> Attached is a patch which moves the messages to ProcSleep(). To do this I had
> to move the semaphore signal to unconditionally be signalled whenever
> CheckDeadLock() is called regardless of whether it finds a hard deadlock. I'm
> not 100% sure that's correct but afaik we only use semaphores to signal state
> changes and deal with spurious semaphore firings everywhere.

It's a bit itchy-seeming, but I think what you are actually doing is
going over to a regime where every wait on the semaphore checks and
re-waits if it didn't get the condition it wants.  Before, I think we
did that for every use of the semaphore except this one (which is an
outgrowth of the fact that originally this was indeed the only use of
the sema, and the others got shoehorned in over time).

I'll check it over.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] 'Waiting on lock'
Следующее
От: Michael Paesold
Дата:
Сообщение: Re: WIP: rewrite numeric division