Re: [PATCH] lock_timeout and common SIGALRM framework

Поиск
Список
Период
Сортировка
От Boszormenyi Zoltan
Тема Re: [PATCH] lock_timeout and common SIGALRM framework
Дата
Msg-id 500C5C8A.8030607@cybertec.at
обсуждение исходный текст
Ответ на Re: [PATCH] lock_timeout and common SIGALRM framework  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: [PATCH] lock_timeout and common SIGALRM framework  (Boszormenyi Zoltan <zb@cybertec.at>)
Список pgsql-hackers
2012-07-17 06:32 keltezéssel, Alvaro Herrera írta:
> Excerpts from Tom Lane's message of vie jul 13 18:23:31 -0400 2012:
>> Boszormenyi Zoltan <zb@cybertec.at> writes:
>>>>> Try SET deadlock_timeout = 0;
>> Actually, when I try that I get
>>
>> ERROR:  0 is outside the valid range for parameter "deadlock_timeout" (1 .. 2147483647)
>>
>> So I don't see any bug here.
> I committed this patch without changing this.  If this needs patched,
> please speak up.  I also considered adding a comment on
> enable_timeout_after about calling it with a delay of 0, but refrained;
> if anybody thinks it's necessary, suggestions are welcome.

Thanks for committing this part.

Attached is the revised (and a lot leaner, more generic) lock timeout patch,
which introduces new functionality for the timeout registration framework.
The new functionality is called "extra timeouts", better naming is welcome.
Instead of only the previously defined (deadlock and statement) timeouts,
the "extra" timeouts can also be activated from within ProcSleep() in a linked
way.

The lock timeout is a special case of this functionality. To show this, this patch
is split into two again to make reviewing easier.

This way, the timeout framework is really usable for external modules, as
envisioned by you guys

Also, rewriting statement and deadlock timeouts using this functionality
and unifying the two registration interfaces may be possible later. But
messing up proven and working code is not in the scope of this patch or
my job at this point.

Best regards,
Zoltán Böszörményi

--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de
      http://www.postgresql.at/


Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [patch] libpq one-row-at-a-time API
Следующее
От: Noah Misch
Дата:
Сообщение: Re: isolation check takes a long time