← Back to Labs

PostgreSQL Vacuum Lifecycle

Walk from one live tuple to dead-row cleanup, index maintenance, visibility-map updates, and anti-wraparound freezing.

SNAPSHOT + VACUUM HORIZONNo old snapshots are still reading this row.No cleanup needed. A future vacuum would just confirm visibility state.HEAP PAGE 42free space on page: 24%Axmin 810status: visiblefreeslot reusableunusedfreeslot reusableunusedfreeslot reusableunusedINDEX ENTRIESidx_email -> Aspare entryVACUUM METADATAVM bits: all-visible = no, all-frozen = notuple age: 12M transactionsThe page contains one live version and three empty slots.
Step 1 / 6One insert creates one live tuple version

The heap page holds one live row version and one index entry that points to it. Vacuum has nothing to remove yet because no older version exists.

snapshot state
No old snapshots are still reading this row.
vacuum action
No cleanup needed. A future vacuum would just confirm visibility state.
page metadata
VM bits: all-visible = no, all-frozen = no

Arrow keys to navigate · R to reset

Tap dots to jump to any step

Read the full article →Take the quiz →