1- <!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.84 2010/08/17 04:37:20 petere Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.85 2010/08/21 10:59:17 mha Exp $ -->
22
33<chapter id="monitoring">
44 <title>Monitoring Database Activity</title>
@@ -117,9 +117,9 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
117117 is a subsystem that supports collection and reporting of information about
118118 server activity. Presently, the collector can count accesses to tables
119119 and indexes in both disk-block and individual-row terms. It also tracks
120- the total number of rows in each table, andthe last vacuum and analyze times
121- for each table. It can also count calls to user-defined functions and
122- the total time spent in each one.
120+ the total number of rows in each table, andinformation about vacuum and
121+ analyze actions for each table. It can also count calls to user-defined
122+ functions and the total time spent in each one.
123123 </para>
124124
125125 <para>
@@ -293,7 +293,11 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
293293 the last time the table was vacuumed manually,
294294 the last time it was vacuumed by the autovacuum daemon,
295295 the last time it was analyzed manually,
296- and the last time it was analyzed by the autovacuum daemon.
296+ the last time it was analyzed by the autovacuum daemon,
297+ number of times it has been vacuumed manually,
298+ number of times it has been vacuumed by the autovacuum daemon,
299+ number of times it has been analyzed manually,
300+ and the number of times it has been analyzed by the autovacuum daemon.
297301 </entry>
298302 </row>
299303
@@ -314,8 +318,8 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
314318 <entry>Similar to <structname>pg_stat_all_tables</>, but counts actions
315319 taken so far within the current transaction (which are <emphasis>not</>
316320 yet included in <structname>pg_stat_all_tables</> and related views).
317- The columns for numbers of live and dead rows andlast- vacuum and
318- last- analyzetimes are not present in this view.</entry>
321+ The columns for numbers of live and dead rows and vacuum and
322+ analyzeactions are not present in this view.</entry>
319323 </row>
320324
321325 <row>
@@ -718,6 +722,38 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
718722 </entry>
719723 </row>
720724
725+ <row>
726+ <entry><literal><function>pg_stat_get_vacuum_count</function>(<type>oid</type>)</literal></entry>
727+ <entry><type>bigint</type></entry>
728+ <entry>
729+ The number of times this table has been vacuumed manually
730+ </entry>
731+ </row>
732+
733+ <row>
734+ <entry><literal><function>pg_stat_get_autovacuum_count</function>(<type>oid</type>)</literal></entry>
735+ <entry><type>bigint</type></entry>
736+ <entry>
737+ The number of times this table has been vacuumed by the autovacuum daemon
738+ </entry>
739+ </row>
740+
741+ <row>
742+ <entry><literal><function>pg_stat_get_analyze_count</function>(<type>oid</type>)</literal></entry>
743+ <entry><type>bigint</type></entry>
744+ <entry>
745+ The number of times this table has been analyzed manually
746+ </entry>
747+ </row>
748+
749+ <row>
750+ <entry><literal><function>pg_stat_get_autoanalyze_count</function>(<type>oid</type>)</literal></entry>
751+ <entry><type>bigint</type></entry>
752+ <entry>
753+ The number of times this table has been analyzed by the autovacuum daemon
754+ </entry>
755+ </row>
756+
721757 <row>
722758 <entry><literal><function>pg_stat_get_xact_numscans</function>(<type>oid</type>)</literal></entry>
723759 <entry><type>bigint</type></entry>