Vacuum is the bill for MVCC's zero-lock reads. Every UPDATE and DELETE leaves an old version behind, and nothing removes it until vacuum does. This diagram is one vacuum run: detect which versions are dead, mark them, sweep and compact pages, record free space, refresh statistics. The correctness constraint sits in the middle — a version visible to any still-running snapshot must survive, so vacuum's horizon is the oldest active snapshot, not the current time.
The ordering matters because each stage produces what the next consumes: detection feeds marking, marking creates the space that compaction rearranges, and compaction produces the free space map entries that make future inserts cheap. The last two stages are the quiet payoff — the free space map turns reclaimed space into reusable space, and fresh statistics keep the planner honest. Skip vacuum long enough and the table grows without bound, with dead versions dragging down every scan.