aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2006-05-19 19:08:27 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2006-05-19 19:08:27 +0000
commit1f219cf433e792d61040246c24b136b0e6a2c930 (patch)
tree4489a0e0cb6947bc2ece721f220b68f80e64a0f6 /doc/src
parent09518fbdf445554f54e4c3cffc964fe2d073b550 (diff)
downloadpostgresql-1f219cf433e792d61040246c24b136b0e6a2c930.tar.gz
postgresql-1f219cf433e792d61040246c24b136b0e6a2c930.zip
Add last-vacuum/analyze-time columns to the stats collector, both manual and
issued by autovacuum. Add accessor functions to them, and use those in the pg_stat_*_tables system views. Catalog version bumped due to changes in the pgstat views and the pgstat file. Patch from Larry Rosenman, minor improvements by me.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/monitoring.sgml38
1 files changed, 36 insertions, 2 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 41ee9013b57..c9a2c4f3e6d 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.31 2006/03/10 19:10:48 momjian Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.32 2006/05/19 19:08:26 alvherre Exp $ -->
<chapter id="monitoring">
<title>Monitoring Database Activity</title>
@@ -250,7 +250,9 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
<row>
<entry><structname>pg_stat_all_tables</></entry>
<entry>For each table in the current database (including TOAST tables),
- the table OID, schema and table name, number of sequential
+ the table OID, schema and table name, the last time the table was
+ vacuumed by the user and the autovacuum daemon, the last time the table
+ was analyzed by the user and the autovacuum daemon, number of sequential
scans initiated, number of live rows fetched by sequential
scans, number of index scans initiated (over all indexes
belonging to the table), number of live rows fetched by index
@@ -544,6 +546,38 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
</row>
<row>
+ <entry><literal><function>pg_stat_get_last_vacuum_time</function>(<type>oid</type>)</literal></entry>
+ <entry><type>timestamptz</type></entry>
+ <entry>
+ Time of the last vacuum initiated by the user
+ </entry>
+ </row>
+
+ <row>
+ <entry><literal><function>pg_stat_get_last_autovacuum_time</function>(<type>oid</type>)</literal></entry>
+ <entry><type>timestamptz</type></entry>
+ <entry>
+ Time of the last vacuum initiated by the autovacuum daemon
+ </entry>
+ </row>
+
+ <row>
+ <entry><literal><function>pg_stat_get_last_analyze_time</function>(<type>oid</type>)</literal></entry>
+ <entry><type>timestamptz</type></entry>
+ <entry>
+ Time of the last analyze initiated by the user
+ </entry>
+ </row>
+
+ <row>
+ <entry><literal><function>pg_stat_get_last_autoanalyze_time</function>(<type>oid</type>)</literal></entry>
+ <entry><type>timestamptz</type></entry>
+ <entry>
+ Time of the last analyze initiated by the autovacuum daemon
+ </entry>
+ </row>
+
+ <row>
<entry><literal><function>pg_stat_get_backend_idset</function>()</literal></entry>
<entry><type>setof integer</type></entry>
<entry>