psql -d appdb -c "VACUUM (VERBOSE) users;"

Category: Databases & SQL

psql -d appdb -c "VACUUM (VERBOSE) users;"

Vacuum one table verbosely

Vacuuming a single table with VERBOSE prints how many dead tuples were removed, which pages were freed, and the timing. Great for verifying autovacuum keeps up on a hot table. The parenthesized syntax is the modern form of VACUUM VERBOSE.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.