1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Add a txn_start column to pg_stat_activity. This makes it easier to

identify long-running transactions. Since we already need to record
the transaction-start time (e.g. for now()), we don't need any
additional system calls to report this information.

Catversion bumped, initdb required.
This commit is contained in:
Neil Conway
2006-12-06 18:06:48 +00:00
parent dd740e1fd0
commit 886a02d1cb
9 changed files with 77 additions and 21 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.41 2006/12/02 09:29:51 petere Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.42 2006/12/06 18:06:46 neilc Exp $ -->
<chapter id="monitoring">
<title>Monitoring Database Activity</title>
@ -244,16 +244,16 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<tbody>
<row>
<entry><structname>pg_stat_activity</></entry>
<entry>One row per server process, showing database OID, database name,
process <acronym>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
parameter <varname>stats_command_string</varname> has been
turned off. Furthermore, these columns are only visible if the
user examining the view is a superuser or the same as the user
owning the process being reported on.
<entry>One row per server process, showing database OID, database
name, process <acronym>ID</>, user OID, user name, current query,
query's waiting status, time at which the current transaction and
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 parameter
<varname>stats_command_string</varname> has been turned off.
Furthermore, these columns are only visible if the user examining
the view is a superuser or the same as the user owning the process
being reported on.
</entry>
</row>