Darshan Turakhia reported that a high-traffic notifications table accumulated 11.2 million dead rows . In that case, the autovacuum threshold and I/O budget let new dead tuples accumulate faster than vacuum could clear them. The table plus indexes occupied 41 GB before pg_repack reduced them to 9.8 GB. More generally, ordinary VACUUM makes dead-tuple space reusable inside PostgreSQL but usually does not shrink the relation file.
PostgreSQL 19 introduces REPACK as a core SQL command to solve this exact gap.
TL;DR
PostgreSQL 19 introduces REPACK , a built-in SQL command that reclaims disk space caused by table bloat by rewriting tables and rebuilding indexes. It replaces VACUUM FULL and CLUSTER as the primary table-rewrite command.
VACUUM vs. REPACK: Regular VACUUM cleans up dead tuples and makes space reusable but generally doesn't reduce table file size.…