Gnoseed
Databases · Flashcard

Why can a forgotten replication slot stop VACUUM from removing dead tuples?

Why this is the answer

A slot stores xmin (and catalog_xmin for logical slots), the oldest transaction it needs retained, and VACUUM cannot remove tuples deleted by any later transaction, even while no consumer is connected. Retained WAL is a separate cost that fills pg_wal but does not block vacuum, slots take no table locks, and publication membership never makes autovacuum skip a table. Long-running and prepared transactions hold the same horizon back.

Read more in the docs
Study in Gnoseed →