diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index a0977c157b..21b2f2c880 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -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 diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index a730e3b930..064656bbc5 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -1,5 +1,5 @@ @@ -144,6 +144,15 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE 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.