-
+
Server Configuration
Enables the collection of information on the currently
executing command of each session, along with the time at
- which that command began execution. This parameter is off by
+ which that command began execution. This parameter is on by
default. Note that even when enabled, this information is not
visible to all users, only to superusers and the user owning
the session being reported on; so it should not represent a
-
+
Monitoring Database Activity
- Since the parameters stats_command_string,
- stats_block_level, and
+ Since the parameters stats_block_level, and
stats_row_level default to false>,
very few statistics are collected in the default
- configuration. Enabling one or more of these configuration
- variables will significantly enhance the amount of useful data
+ configuration. Enabling either of these configuration
+ variables will significantly increase the amount of useful data
produced by the statistics facilities, at the expense of
additional run-time overhead.
process
ID>, user OID, user name, current query, 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 only available if the
+ that report data on the current query are available unless the
parameter stats_command_string has been
- turned on. Furthermore, these columns read as null unless the
+ 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.
pg_stat_get_backend_activity(integer)
text
- Active command of the given server process (null if the
- current user is not a superuser nor the same user as that of
- the session being queried, or
- stats_command_string is not on)
+ Active command of the given server process, 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)
timestamp with time zone
The time at which the given server process' currently
- executing query was started (null if the
- current user is not a superuser nor the same user as that of
- the session being queried, or
- stats_command_string is not on)
+ executing query was started, 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)