Vacuum. The VACUUM command will reclaim storage space occupied by dead tuples. In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table.
Why does Postgres need vacuum?
PostgreSQL's VACUUM command has to process each table on a regular basis for several reasons: To recover or reuse disk space occupied by updated or deleted rows. To update data statistics used by the PostgreSQL query planner. To update the visibility map, which speeds up index-only scans.
What is database vacuuming?
A vacuum is used for recovering space occupied by “dead tuples” in a table. A dead tuple is created when a record is either deleted or updated (a delete followed by an insert). ... When a vacuum process runs, the space occupied by these dead tuples is marked reusable by other tuples.