Practical PostgreSQL | ||
---|---|---|
Prev |
vacuumdb [ options ] [ --analyze | -z ] [ --alldb | -a ] [ --verbose | -v ] [ --table 'table [ ( column [,...] ) ]' ] [ [-d] dbname ]
The vacuumdb program accepts the following command line arguments:
Use this parameter to specify the name of the database you wish to clean or analyze.
Pass this parameter to calculate the database's statistics so they can be used by the optimizer.
Pass this parameter to vacuum all databases.
Pass this parameter to have more detailed information displayed while vacuuming is in progress.
Use this parameter to perform a vacuum only on a specified table. You may only pass column names while using the --analyze option. You will most likely have to escape paranthesis from the command line when doing so.
Use this parameter to specify the hostname that postmaster is running on.
Use this parameter to specify either the TCP/IP port or socket file extension that postmaster is running on.
This parameter takes the username you wish to connect as.
Pass this parameter to force vacuumdb to prompt for a password during operation.
Pass this parameter to display all commands that vacuumdb generates and sends to the backend.
Pass this parameter to run in quiet mode; while in quiet mode, the program will not display any information.
This message is displayed if the vacuuming process was successful.
This message is displayed if an error was encountered during the vacuum. Any error messages displayed will be the same as would be generated by the actual VACUUM command; refer to VACUUM for more information on error messages displayed.
Use vacuumdb to clean up a database or display quer optimizer statistics about it. Essentially, the command is a wrapper for the VACUUM command. Because it is a script, it is executable from the command line (whereas the normal VACUUM command requires you to be connected to the database through a frontend application). Also, because the script executes the psql program in order to run its command, you may receive psql error messages; the psql reference section contains more information about its program-specific errors.