summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorMagnus Hagander2008-08-05 12:09:30 +0000
committerMagnus Hagander2008-08-05 12:09:30 +0000
commit70d756970b7b2e93e6f807f5c55e2ad7727e212a (patch)
treefa46246b40b89f17a0cb2605068234ffa75c7c0e /doc/src
parent7e61edf2e7c0abc32c7bbf758d44e92fd76ed7d4 (diff)
Move pgstat.tmp into a temporary directory under $PGDATA named pg_stat_tmp.
This allows the use of a ramdrive (either through mount or symlink) for the temporary file that's written every half second, which should reduce I/O. On server shutdown/startup, the file is written to the old location in the global directory, to preserve data across restarts. Bump catversion since the $PGDATA directory layout changed.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/monitoring.sgml13
-rw-r--r--doc/src/sgml/storage.sgml8
2 files changed, 19 insertions, 2 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 0d56e39d6f4..29a3e107030 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.60 2008/06/18 17:44:12 neilc Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.61 2008/08/05 12:09:30 mha Exp $ -->
<chapter id="monitoring">
<title>Monitoring Database Activity</title>
@@ -164,6 +164,17 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
only superusers are allowed to change these parameters with
<command>SET</>.)
</para>
+
+ <para>
+ The statistics collector communicates with the backends needing
+ information (including autovacuum) through temporary files.
+ These files are stored in the <filename>pg_stat_tmp</filename> subdirectory.
+ When the postmaster shuts down, a permanent copy of the statistics
+ data is stored in the <filename>global</filename> subdirectory. For increased
+ performance, it is possible to mount or symlink a RAM based
+ filesystem to the <filename>pg_stat_tmp</filename> directory.
+ </para>
+
</sect2>
<sect2 id="monitoring-stats-views">
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 0303a2b3d4e..e564fd2be9a 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/storage.sgml,v 1.23 2008/05/02 01:08:26 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/storage.sgml,v 1.24 2008/08/05 12:09:30 mha Exp $ -->
<chapter id="storage">
@@ -78,6 +78,12 @@ Item
</row>
<row>
+ <entry><filename>pg_stat_tmp</></entry>
+ <entry>Subdirectory containing temporary files for the statistics
+ subsystem</entry>
+</row>
+
+<row>
<entry><filename>pg_subtrans</></entry>
<entry>Subdirectory containing subtransaction status data</entry>
</row>