Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

GNU/Linux

RedHat 5.2

(Apollo)

vacuum(l)


VACUUM

VACUUM

NAME
SYNOPSIS
DESCRIPTION

NAME

vacuum - vacuum a database

SYNOPSIS

vacuum [verbose] [analyze] [table]
vacuum [verbose] analyze [
table [(column,...)]]

DESCRIPTION

Vacuum is the Postgres vacuum cleaner. It opens every class in the database, cleans out records from rolled back transactions, and updates statistics in the system catalogs. The statistics maintained include the number of tuples and number of pages stored in all classes. Running vacuum periodically will increase Postgres’s speed in processing user queries.

verbose prints a detailed vacuum activity report for each table.

analyze also updates column statistics used by the optimizer to determine the most efficient way to execute a query. The statistics represent the disbursion of the data in each column. This information is valuable when several execution paths are possible.

The open database is the one that is vacuumed.

We recommend that production databases be vacuumed 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 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. data/base/dbname/pg_vlock).



vacuum(l)