mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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
This commit is contained in:
@ -620,8 +620,8 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||
<row>
|
||||
<entry><structfield>backend_start</></entry>
|
||||
<entry><type>timestamp with time zone</></entry>
|
||||
<entry>Time when this process was started, i.e., when the
|
||||
client connected to the server
|
||||
<entry>Time when this process was started. For client backends,
|
||||
this is the time the client connected to the server.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
@ -797,6 +797,17 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
|
||||
<xref linkend="guc-track-activity-query-size">.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><structfield>backend_type</structfield></entry>
|
||||
<entry><type>text</type></entry>
|
||||
<entry>Type of current backend. Possible types are
|
||||
<literal>autovacuum launcher</>, <literal>autovacuum worker</>,
|
||||
<literal>background worker</>, <literal>background writer</>,
|
||||
<literal>client backend</>, <literal>checkpointer</>,
|
||||
<literal>startup</>, <literal>walreceiver</>,
|
||||
<literal>walsender</> and <literal>walwriter</>.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user