New (9.4) XactLockTableWait() sets the reason for the wait, so that if we emit a log message then it will produce a log message to say its not waiting on a transaction, its waiting on a lock.
Nice. log_lock_waits works great. New (9.6) wait_event code is not correctly set. In ProcSleep() we set the wait reason according to the actual lock tag, effectively ignoring the information specifically provided by XactLockTableWait(). Ugh. pg_stat_activity shows a wait_event of 'transactionid' rather than 'tuple' pg_locks shows a transactionid lock rather than a wait for tuple lock That looks like a bug since we get different answers from log_lock_wait and wait_event, which is annoying and confusing. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers