From: | Boszormenyi Zoltan <zb(at)cybertec(dot)at> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Marc Cousin <cousinmarc(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Hans-Juergen Schoenig <hs(at)cybertec(dot)at>, Ants Aasma <ants(at)cybertec(dot)at>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: [PATCH] lock_timeout and common SIGALRM framework |
Date: | 2012-08-21 14:29:17 |
Message-ID: | 50339B3D.8040403@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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/
Attachment | Content-Type | Size |
---|---|---|
1-timeout-framework-v21.patch | text/x-patch | 17.9 KB |
2-lock_timeout-v21.patch | text/x-patch | 15.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-08-21 14:41:51 | Re: NOT NULL constraints in foreign tables |
Previous Message | Kevin Grittner | 2012-08-21 14:16:10 | Re: temporal support patch |