From 9e38d2a4a8e601cb49b989c0938c1ba531d864a1 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 30 May 2007 19:45:01 +0000 Subject: [PATCH] Update documentation mention of VACUUM FULL and CLUSTER where appropriate. Guillaume Cottenceau --- doc/src/sgml/maintenance.sgml | 13 +++++++++---- doc/src/sgml/ref/vacuum.sgml | 11 ++++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index de8df507ea..d0e2ef57e6 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -1,4 +1,4 @@ - + Routine Database Maintenance Tasks @@ -157,7 +157,8 @@ command. This uses a more aggressive algorithm for reclaiming the space consumed by dead row versions. Any space that is freed by VACUUM FULL is immediately returned to the - operating system. Unfortunately, this variant of the + operating system, and the table data is physically compacted on + the disk. Unfortunately, this variant of the VACUUM command acquires an exclusive lock on each table while VACUUM FULL is processing it. Therefore, frequently using VACUUM FULL can @@ -168,12 +169,16 @@ The standard form of VACUUM is best used with the goal of maintaining a fairly level steady-state usage of disk space. If - you need to return disk space to the operating system you can use + you need to return disk space to the operating system, you can use VACUUM FULL — but what's the point of releasing disk space that will only have to be allocated again soon? Moderately frequent standard VACUUM runs are a better approach than infrequent VACUUM FULL runs for maintaining - heavily-updated tables. + heavily-updated tables. However, if some heavily-updated tables + have gone too long with infrequent VACUUM, you can + use VACUUM FULL or CLUSTER to get performance + back (it is much slower to scan a table containing almost only dead + rows). diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml index a2c45b5a0c..60bd2ff73e 100644 --- a/doc/src/sgml/ref/vacuum.sgml +++ b/doc/src/sgml/ref/vacuum.sgml @@ -1,5 +1,5 @@ @@ -164,10 +164,11 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ The option is not recommended for routine use, but might be useful in special cases. An example is when you have deleted - most of the rows in a table and would like the table to physically shrink - to occupy less disk space. VACUUM FULL will usually - shrink the table more than a plain VACUUM would. - The option does not shrink indexes; a periodic + or updated most of the rows in a table and would like the table to + physically shrink to occupy less disk space and allow faster table + scans. VACUUM FULL will usually shrink the table + more than a plain VACUUM would. The + option does not shrink indexes; a periodic REINDEX is still recommended. In fact, it is often faster to drop all indexes, VACUUM FULL, and recreate the indexes.