Skip to content
masterclass Buddy

PostgreSQL · Command

VACUUM

VACUUM removes obsolete row versions and makes their space reusable. It can also update planner statistics, maintain visibility information, and freeze old rows to prevent transaction ID wraparound.

Last updated

Syntax

VACUUM [ ( option [, ...] ) ] [ table_and_columns [, ...] ]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • ANALYZE
  • autovacuum daemon
  • vacuumdb
  • visibility map
  • VACUUM FULL
  • transaction ID wraparound

Source: VACUUM. Checked 2026-11-03.