|
1 | 1 | <!--
|
2 |
| -$PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.27 2004/12/28 19:08:58 tgl Exp $ |
| 2 | +$PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.28 2005/05/09 11:31:32 neilc Exp $ |
3 | 3 | -->
|
4 | 4 |
|
5 | 5 | <chapter id="monitoring">
|
@@ -221,15 +221,16 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
221 | 221 | <row>
|
222 | 222 | <entry><structname>pg_stat_activity</></entry>
|
223 | 223 | <entry>One row per server process, showing process
|
224 |
| - <acronym>ID</>, database, user, current query, and the time at |
225 |
| - which the current query began execution. The columns that report |
226 |
| - data on the current query are only available if the parameter |
227 |
| - <varname>stats_command_string</varname> has been turned on. |
228 |
| - Furthermore, these columns read as null unless the user examining |
229 |
| - the view is a superuser or the same as the user owning the process |
230 |
| - being reported on. (Note that because of the |
231 |
| - collector's reporting delay, current query will only be up-to-date for |
232 |
| - long-running queries.)</entry> |
| 224 | + <acronym>ID</>, database, user, current query, the time at which |
| 225 | + the current query began execution, the time at which the backend |
| 226 | + was started and the client address and port number. The columns |
| 227 | + that report data on the current query are only available if the |
| 228 | + parameter <varname>stats_command_string</varname> has been |
| 229 | + turned on. Furthermore, these columns read as null unless the |
| 230 | + user examining the view is a superuser or the same as the user |
| 231 | + owning the process being reported on. (Note that because of the |
| 232 | + collector's reporting delay, the current query will only be |
| 233 | + up-to-date for long-running queries.)</entry> |
233 | 234 | </row>
|
234 | 235 |
|
235 | 236 | <row>
|
@@ -509,7 +510,7 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
509 | 510 | <entry><type>set of integer</type></entry>
|
510 | 511 | <entry>
|
511 | 512 | Set of currently active backend process IDs (from 1 to the
|
512 |
| - number of active backend processes). See usage example in the text. |
| 513 | + number of active backend processes). See usage example in the text |
513 | 514 | </entry>
|
514 | 515 | </row>
|
515 | 516 |
|
@@ -568,6 +569,38 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
568 | 569 | </entry>
|
569 | 570 | </row>
|
570 | 571 |
|
| 572 | + <row> |
| 573 | + <entry><literal><function>pg_stat_get_backend_start</function>(<type>integer</type>)</literal></entry> |
| 574 | + <entry><type>timestamp with time zone</type></entry> |
| 575 | + <entry> |
| 576 | + The time at which the given backend process was started, or |
| 577 | + null if the current user is not a superuser nor the same user |
| 578 | + as that of the session being queried |
| 579 | + </entry> |
| 580 | + </row> |
| 581 | + |
| 582 | + <row> |
| 583 | + <entry><literal><function>pg_stat_get_backend_client_addr</function>(<type>integer</type>)</literal></entry> |
| 584 | + <entry><type>inet</type></entry> |
| 585 | + <entry> |
| 586 | + The IP address of the client connected to the given |
| 587 | + backend. Null if the connection is over a Unix domain |
| 588 | + socket. Also null if the current user is not a superuser nor |
| 589 | + the same user as that of the session being queried |
| 590 | + </entry> |
| 591 | + </row> |
| 592 | + |
| 593 | + <row> |
| 594 | + <entry><literal><function>pg_stat_get_backend_client_port</function>(<type>integer</type>)</literal></entry> |
| 595 | + <entry><type>integer</type></entry> |
| 596 | + <entry> |
| 597 | + The IP port number of the client connected to the given |
| 598 | + backend. -1 if the connection is over a Unix domain |
| 599 | + socket. Null if the current user is not a superuser nor the |
| 600 | + same user as that of the session being queried |
| 601 | + </entry> |
| 602 | + </row> |
| 603 | + |
571 | 604 | <row>
|
572 | 605 | <entry><literal><function>pg_stat_reset</function>()</literal></entry>
|
573 | 606 | <entry><type>boolean</type></entry>
|
|
0 commit comments