Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.
Дата
Msg-id 4B5D5D68.20501@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Heikki Linnakangas wrote:
> Simon Riggs wrote:
>> On Mon, 2010-01-25 at 09:52 +0200, Heikki Linnakangas wrote:
>>> Would this simple scheme work:
>>>
>>> When the startup process has waited for a short while (ie
>>> deadlock_timeout), it sends the signal "please check if you're holding a
>>> pin on buffer X" to all backends. When a backend receives that signal,
>>> it checks if it is holding a pin on the given buffer *and* waiting on a
>>> lock. If it is, abort the transaction. Assuming that a backend can only
>>> block waiting on a lock held by the startup process, deadlock detection
>>> is as simple as that.
>> No, it won't work. A deadlock could occur after the startup process has
>> already been waiting for longer than the deadlock timeout.
> 
> Retry every deadlock_timeout seconds?

Or better yet, also check if the current backend is holding the
waited-for pin in CheckDeadLock().

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Re: pgsql: In HS, Startup process sets SIGALRM when waiting for buffer pin.