Re: [PATCH] lock_timeout and common SIGALRM framework
Boszormenyi Zoltan <zb@cybertec.at>
From: Boszormenyi Zoltan <zb@cybertec.at>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Marc Cousin <cousinmarc@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>, Hans-Juergen Schoenig <hs@cybertec.at>, Ants Aasma <ants@cybertec.at>, Robert Haas <robertmhaas@gmail.com>
Date: 2012-08-21T14:29:17Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix Windows implementation of PGSemaphoreLock.
- ada8fa08fc6c 9.2.0 cited
Attachments
- 1-timeout-framework-v21.patch (text/x-patch) patch v21
- 2-lock_timeout-v21.patch (text/x-patch) patch v21
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/