From 9bf760f7dec703aa34d9bd68aaa982943d24411e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 19 Aug 2006 01:36:34 +0000 Subject: Add a 'waiting' column to pg_stat_activity to carry the same information that ps_status provides by appending 'waiting' to the PS display. This completes the project of making it feasible to turn off process title updates and instead rely on pg_stat_activity. Per my suggestion a few weeks ago. --- doc/src/sgml/monitoring.sgml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 21275f9d5f0..41600f8bb42 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -1,4 +1,4 @@ - + Monitoring Database Activity @@ -245,7 +245,8 @@ postgres: user database host pg_stat_activity One row per server process, showing database OID, database name, - process ID, user OID, user name, current query, time at + process ID, user OID, user name, current query, query's + waiting status, time at which the current query began execution, time at which the process was started, and client's address and port number. The columns that report data on the current query are available unless the @@ -649,6 +650,17 @@ postgres: user database host + + pg_stat_get_backend_waiting(integer) + boolean + + True if the given server process is waiting for a lock, + but only if the current user is a superuser or the same user as that of + the session being queried (and + stats_command_string is on) + + + pg_stat_get_backend_activity_start(integer) timestamp with time zone -- cgit v1.2.3