vacuumdb
Garbage-collect and analyze a PostgreSQL database. tldr-pages
On several platforms
Several platforms
Vacuum a specific database
vacuumdb database_nameIdentifyVacuum all databases
vacuumdb --allIdentifyVacuum a specific table in a database
vacuumdb --table table_name database_nameIdentifyVacuum and update statistics for the query planner
vacuumdb --analyze database_nameIdentifyPerform a full vacuum (more aggressive, locks tables, rewrites the whole table)
vacuumdb --full database_nameIdentifyVacuum with verbose output
vacuumdb --verbose database_nameIdentifyVacuum a database using multiple parallel jobs
vacuumdb --jobs number_of_jobs database_nameIdentify