postgresql/src/backend/access
Alvaro Herrera f88d4cfc9d Setup error context callback for transaction lock waits
With this in place, a session blocking behind another one because of
tuple locks will get a context line mentioning the relation name, tuple
TID, and operation being done on tuple.  For example:

LOG:  process 11367 still waiting for ShareLock on transaction 717 after 1000.108 ms
DETAIL:  Process holding the lock: 11366. Wait queue: 11367.
CONTEXT:  while updating tuple (0,2) in relation "foo"
STATEMENT:  UPDATE foo SET value = 3;

Most usefully, the new line is displayed by log entries due to
log_lock_waits, although of course it will be printed by any other log
message as well.

Author: Christian Kruse, some tweaks by Álvaro Herrera
Reviewed-by: Amit Kapila, Andres Freund, Tom Lane, Robert Haas
2014-03-19 15:10:36 -03:00
..
common Separate multixact freezing parameters from xid's 2014-02-13 19:36:31 -03:00
gin Fix thinko: have trueTriConsistentFn return GIN_TRUE. 2014-03-17 17:29:04 +02:00
gist Update copyright for 2014 2014-01-07 16:05:30 -05:00
hash Allow use of "z" flag in our printf calls, and use it where appropriate. 2014-01-23 17:18:33 -05:00
heap Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
index Introduce logical decoding. 2014-03-03 16:32:18 -05:00
nbtree Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
rmgrdesc Fix race condition in B-tree page deletion. 2014-03-14 16:07:19 +02:00
spgist Allow use of "z" flag in our printf calls, and use it where appropriate. 2014-01-23 17:18:33 -05:00
transam Remove rm_safe_restartpoint machinery. 2014-03-18 22:10:35 +02:00
Makefile Split out rmgr rm_desc functions into their own files 2012-11-28 13:01:15 -03:00