vacuumdb is a utility for cleaning a
vacuumdb will also generate internal statistics
used by the PostgreSQL query optimizer.
vacuumdb is a shell script wrapper around the
the PostgreSQL interactive terminal
psql. There is no effective
difference between vacuuming databases via this or other methods.
psql must be found by the script and
a database server must be running at the targeted host. Also, any default
settings and environment variables available to psql
and the libpq front-end library do apply.
vacuumdb might need to connect several
times to the PostgreSQL server, asking for
a password each time. It is convenient to have a
$HOME/.pgpass file in such cases.
vacuumdb accepts the following command-line arguments:
[-d] dbname [--dbname] dbname
Specifies the name of the database to be cleaned or analyzed.
If this is not specified and -a (or
--all) is not used, the database name is read
from the environment variable PGDATABASE. If
that is not set, the user name specified for the connection is
Vacuum all databases.
Echo the commands that vacuumdb generates
and sends to the server.