Re: [PATCH] lock_timeout and common SIGALRM framework

Поиск
Список
Период
Сортировка
От Boszormenyi Zoltan
Тема Re: [PATCH] lock_timeout and common SIGALRM framework
Дата
Msg-id 50339B3D.8040403@cybertec.at
обсуждение исходный текст
Ответ на Re: [PATCH] lock_timeout and common SIGALRM framework  (Boszormenyi Zoltan <zb@cybertec.at>)
Ответы Re: [PATCH] lock_timeout and common SIGALRM framework
Список pgsql-hackers
Hi,

new version with a lot more cleanup is attached.

2012-07-22 22:03 keltezéssel, Boszormenyi Zoltan írta:
> 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.

This "mini-framework" is now called "lock manager timeouts" and
both deadlock timeout and the new lock timeout belong to it.
The little piece of standalone code managing these are in
storage/lmgr/lmgrtimeout.c.

There is no PGSemaphoreTimedLock() any more. Instead,
PGSemaphoreLock() gained a new function argument for
checking timeouts. This has three advantages:
- There is only one PGSemaphoreLock() implementation and bug fixes
   like ada8fa08fc6cf5f199b6df935b4d0a730aaa4fec don't need to
   touch several places.
- There is no layering violation between pg_sema.c and proc.c.
- The extra function can check other type of conditions from different
   callers, should the need arise.

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 по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: temporal support patch
Следующее
От: Robert Haas
Дата:
Сообщение: Re: NOT NULL constraints in foreign tables