Provide much better wait information in pg_stat_activity.
When a process is waiting for a heavyweight lock, we will now indicate
the type of heavyweight lock for which it is waiting. Also, you can
now see when a process is waiting for a lightweight lock - in which
case we will indicate the individual lock name or the tranche, as
appropriate - or for a buffer pin.
Amit Kapila, Ildus Kurbangaliev, reviewed by me. Lots of helpful
discussion and suggestions by many others, including Alexander
Korotkov, Vladimir Borodin, and many others.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/53be0b1add7064ca5db3cd884302dfc3268d884e
Modified Files
--------------
doc/src/sgml/monitoring.sgml | 414 +++++++++++++++++++++++++++++++++-
src/backend/access/transam/xact.c | 13 +-
src/backend/bootstrap/bootstrap.c | 2 +
src/backend/catalog/system_views.sql | 3 +-
src/backend/postmaster/bgwriter.c | 3 +
src/backend/postmaster/checkpointer.c | 1 +
src/backend/postmaster/pgstat.c | 116 +++++++---
src/backend/postmaster/walwriter.c | 2 +
src/backend/replication/walsender.c | 2 +
src/backend/storage/buffer/bufmgr.c | 5 +
src/backend/storage/lmgr/lmgr.c | 23 ++
src/backend/storage/lmgr/lock.c | 6 +-
src/backend/storage/lmgr/lwlock.c | 67 +++++-
src/backend/storage/lmgr/proc.c | 3 +
src/backend/utils/adt/lockfuncs.c | 2 +-
src/backend/utils/adt/pgstatfuncs.c | 126 +++++++----
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 8 +-
src/include/pgstat.h | 81 ++++++-
src/include/storage/lmgr.h | 2 +
src/include/storage/lock.h | 2 +
src/include/storage/lwlock.h | 2 +
src/include/storage/proc.h | 2 +
src/test/regress/expected/rules.out | 9 +-
24 files changed, 794 insertions(+), 102 deletions(-)