Vacuum implementation

There are two primary sets of internal structures that serve as input and output from data vacuuming.

On the input side, each database row includes status flags called hint bits that track whether the transaction that updated the xmin or xmax values is know to be committed or aborted yet. The actual commit logs (pg_xact and sometimes pg_subtrans) are consulted to confirm the hint bits transaction state if they are not set yet. VACUUM also writes to these hint bits, part of the row itself, as it confirms the known state has changed.

Besides updating the data pages themselves, the additional output from VACUUM is the updated information in the FSM.

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.