IT lexicon › Database › Bloat

Bloat

Database På svenska → Updated: 2026-07-30

Dead space left behind in tables and indexes by MVCC. An UPDATE actually writes a new row version and marks the old one dead — the space isn't freed until something cleans up.

Cleanup is autovacuum's job, and it makes dead rows reusable but normally does not return the space to the operating system. A heavily updated table can therefore occupy ten times more space than the data warrants, with worse cache utilization and slower scans as a result. The most common root cause isn't that autovacuum is disabled but that something is blocking it: a long-running transaction, a forgotten replication slot or an unused prepared transaction keeps the dead rows "visible" and impossible to reclaim. Remedies: pg_repack rewrites the table without locking, VACUUM FULL does it with an exclusive lock.

← Back to the lexicon