Add lock_timeout configuration parameter.
This GUC allows limiting the time spent waiting to acquire any one
heavyweight lock.
In support of this, improve the recently-added timeout infrastructure
to permit efficiently enabling or disabling multiple timeouts at once.
That reduces the performance hit from turning on lock_timeout, though
it's still not zero.
Zoltán Böszörményi, reviewed by Tom Lane,
Stephen Frost, and Hari Babu
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/d43837d03067487560af481474ae985df894f786
Modified Files
--------------
doc/src/sgml/config.sgml | 40 +++-
src/backend/postmaster/autovacuum.c | 10 +-
src/backend/storage/ipc/standby.c | 11 +-
src/backend/storage/lmgr/proc.c | 50 ++++-
src/backend/tcop/postgres.c | 17 ++-
src/backend/utils/init/postinit.c | 18 ++
src/backend/utils/misc/guc.c | 11 +
src/backend/utils/misc/postgresql.conf.sample | 1 +
src/backend/utils/misc/timeout.c | 303 +++++++++++++++++--------
src/bin/pg_dump/pg_backup_archiver.c | 5 +-
src/bin/pg_dump/pg_dump.c | 2 +
src/include/storage/proc.h | 5 +-
src/include/utils/timeout.h | 35 +++-
src/test/isolation/expected/timeouts.out | 73 ++++++
src/test/isolation/isolation_schedule | 1 +
src/test/isolation/specs/timeouts.spec | 45 ++++
16 files changed, 511 insertions(+), 116 deletions(-)