Add lock_timeout configuration parameter.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/config.sgml | modified | +37 −3 |
| src/backend/postmaster/autovacuum.c | modified | +6 −4 |
| src/backend/storage/ipc/standby.c | modified | +9 −2 |
| src/backend/storage/lmgr/proc.c | modified | +45 −5 |
| src/backend/tcop/postgres.c | modified | +16 −1 |
| src/backend/utils/init/postinit.c | modified | +18 −0 |
| src/backend/utils/misc/guc.c | modified | +11 −0 |
| src/backend/utils/misc/postgresql.conf.sample | modified | +1 −0 |
| src/backend/utils/misc/timeout.c | modified | +208 −95 |
| src/bin/pg_dump/pg_backup_archiver.c | modified | +4 −1 |
| src/bin/pg_dump/pg_dump.c | modified | +2 −0 |
| src/include/storage/proc.h | modified | +3 −2 |
| src/include/utils/timeout.h | modified | +32 −3 |
| src/test/isolation/expected/timeouts.out | added | +73 −0 |
| src/test/isolation/isolation_schedule | modified | +1 −0 |
| src/test/isolation/specs/timeouts.spec | added | +45 −0 |