From fc70a4b0df38bda6a13941f1581f25fbb643c7f3 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Sun, 26 Mar 2017 22:02:22 -0400 Subject: Show more processes in pg_stat_activity. Previously, auxiliary processes and background workers not connected to a database (such as the logical replication launcher) weren't shown. Include them, so that we can see the associated wait state information. Add a new column to identify the processes type, so that people can filter them out easily using SQL if they wish. Before this patch was written, there was discussion about whether we should expose this information in a separate view, so as to avoid contaminating pg_stat_activity with things people might not want to see. But putting everything in pg_stat_activity was a more popular choice, so that's what the patch does. Kuntal Ghosh, reviewed by Amit Langote and Michael Paquier. Some revisions and bug fixes by me. Discussion: http://postgr.es/m/CA+TgmoYES5nhkEGw9nZXU8_FhA8XEm8NTm3-SO+3ML1B81Hkww@mail.gmail.com --- doc/src/sgml/monitoring.sgml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'doc/src/sgml') diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index e930731b162..9856968997e 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -620,8 +620,8 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser backend_start timestamp with time zone - Time when this process was started, i.e., when the - client connected to the server + Time when this process was started. For client backends, + this is the time the client connected to the server. @@ -797,6 +797,17 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser . + + backend_type + text + Type of current backend. Possible types are + autovacuum launcher, autovacuum worker, + background worker, background writer, + client backend, checkpointer, + startup, walreceiver, + walsender and walwriter. + + -- cgit v1.2.3