Table bloat is an inevitable consequence of Postgres MVCC architecture, especially on write-heavy workloads. Dead tuples pile up as rows update and delete, leaving behind empty storage that standard autovacuum cannot easily return to the operating system.
Historically, database administrators faced bad options. Running VACUUM FULL reclaims the space cleanly, but it acquires an exclusive table lock that blocks all reads and writes, bringing production traffic to a standstill. The alternative meant relying on third-party extensions like pg_repack or pg_squeeze, which introduce external dependencies, trigger overhead, and operational risks.
Postgres 19 introduces REPACK CONCURRENTLY directly into core. It rebuilds the bloated relation in the background while the live table remains completely readable and writable throughout the entire rebuild process.
The command swaps the underlying data pages and re-indexes the table, acquiring only a brief lock at the very end to finish the transition. Running bloat compaction natively without third-party extensions simplifies production maintenance dramatically.
Native concurrent compaction removes one of the most persistent operational pain points in long-running Postgres deployments.












