diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/monitoring.sgml | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index f634d818420..069bad8dc13 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.57 2008/04/10 13:34:33 alvherre Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.58 2008/05/07 14:41:55 mha Exp $ --> <chapter id="monitoring"> <title>Monitoring Database Activity</title> @@ -655,20 +655,31 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re </row> <row> - <entry><literal><function>pg_stat_get_backend_idset</function>()</literal></entry> - <entry><type>setof integer</type></entry> + <!-- See also the entry for this in func.sgml --> + <entry><literal><function>pg_backend_pid</function>()</literal></entry> + <entry><type>integer</type></entry> <entry> - Set of currently active server process numbers (from 1 to the - number of active server processes). See usage example in the text + Process ID of the server process attached to the current session </entry> </row> <row> - <!-- See also the entry for this in func.sgml --> - <entry><literal><function>pg_backend_pid</function>()</literal></entry> - <entry><type>integer</type></entry> + <entry><literal><function>pg_stat_get_activity</function>(<type>integer</type>)</literal></entry> + <entry><type>setof record</type></entry> <entry> - Process ID of the server process attached to the current session + Returns a record of information about the backend with the specified pid, or + one record for each active backend in the system if <symbol>NULL</symbol> is + specified. The fields returned are the same as in the + <structname>pg_stat_activity</structname> view + </entry> + </row> + + <row> + <entry><literal><function>pg_stat_get_backend_idset</function>()</literal></entry> + <entry><type>setof integer</type></entry> + <entry> + Set of currently active server process numbers (from 1 to the + number of active server processes). See usage example in the text </entry> </row> @@ -869,6 +880,8 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re </note> <para> + All functions to access information about backends are indexed by backend id + number, except <function>pg_stat_get_activity</function> which is indexed by PID. The function <function>pg_stat_get_backend_idset</function> provides a convenient way to generate one row for each active server process. For example, to show the <acronym>PID</>s and current queries of all server processes: |