<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.5 1999/07/22 15:09:15 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.6 1999/11/28 02:17:04 tgl Exp $
Postgres documentation
-->
recent changes, and allow the <productname>Postgres</productname>
query optimizer to make better choices in planning user queries.
</para>
- <para>
- If the server crashes during a <command>VACUUM</command> command,
- chances are it will leave a lock file hanging around.
- Attempts to re-run the <command>VACUUM</command> command
- result in an error message about the creation of a lock file. If you
- are sure <command>VACUUM</command> is not running,
- remove the <filename>pg_vlock</filename> file in your
- database directory
- (i.e. <filename><envar>PGDATA</envar>/base/dbname/pg_vlock</filename>).
- </para>
</refsect2>
</refsect1>
We recommend that active production databases be cleaned nightly, in order to keep statistics relatively current. The VACUUM query may be executed at any time, however. In particular, after copying a large class into Postgres or after deleting a large number of records, it may be a good idea to issue a VACUUM query. This will update the system catalogs with the results of all recent changes, and allow the Postgres query optimizer to make better choices in planning user queries.
-If the server crashes during a VACUUM command, chances are it will leave a lock file hanging around. Attempts to re-run the VACUUM command result in an error message about the creation of a lock file. If you are sure VACUUM is not running, remove the pg_vlock file in your database directory (i.e. PGDATA/base/dbname/pg_vlock).
-
" {} "Synopsis" {bold} "
VACUUM \[ VERBOSE \] \[ ANALYZE \] \[ table \]
VACUUM \[ VERBOSE \] ANALYZE \[ table \[ (column \[, ...\] ) \] \]