Document that autovacuum cannot vacuum or analyze temporary tables.
authorBruce Momjian
Fri, 16 Apr 2010 02:22:33 +0000 (02:22 +0000)
committerBruce Momjian
Fri, 16 Apr 2010 02:22:33 +0000 (02:22 +0000)
doc/src/sgml/maintenance.sgml
doc/src/sgml/ref/create_table.sgml

index a0977c157b11c5a78e98b6638150693304c89ae8..21b2f2c8807aa4c81097af2601e2c7f4ab6e8e76 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Routine Database Maintenance Tasks
@@ -642,6 +642,12 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
     since the last ANALYZE.
    
 
+   
+    Temporary tables cannot be accessed by autovacuum.  Therefore,
+    appropriate vacuum and analyze operations should be performed via
+    session SQL commands.
+   
+
    
     The default thresholds and scale factors are taken from
     postgresql.conf, but it is possible to override them
index a730e3b9306e6cb94256c1d377500645c58cb8fe..064656bbc5d331c25112ed94614b5b40ff5da880 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -144,6 +144,15 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE 
       table are automatically temporary as well.
      
 
+     
+      The autovacuum daemon cannot
+      access and therefore cannot vacuum or analyze temporary tables.
+      For this reason, appropriate vacuum and analyze operations should be
+      performed via session SQL commands.  For example, if a temporary
+      table is going to be used in complex queries, it is wise to run
+      ANALYZE on the temporary table after it is populated.
+     
+      
      
       Optionally, GLOBAL or LOCAL
       can be written before TEMPORARY or TEMP.