Add lock_timeout configuration parameter.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 17 Mar 2013 03:22:17 +0000 (23:22 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 17 Mar 2013 03:22:57 +0000 (23:22 -0400)
commitd43837d03067487560af481474ae985df894f786
tree7289d038a184fa3dc59195aaa27538714ea85ad9
parentd2bef5f7db5f3afdbbb3f58b8eff49f0bc7ef790
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
16 files changed:
doc/src/sgml/config.sgml
src/backend/postmaster/autovacuum.c
src/backend/storage/ipc/standby.c
src/backend/storage/lmgr/proc.c
src/backend/tcop/postgres.c
src/backend/utils/init/postinit.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/backend/utils/misc/timeout.c
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_dump.c
src/include/storage/proc.h
src/include/utils/timeout.h
src/test/isolation/expected/timeouts.out [new file with mode: 0644]
src/test/isolation/isolation_schedule
src/test/isolation/specs/timeouts.spec [new file with mode: 0644]