Build a B-tree storage engine (SQLite-style) (11 scenes)
Scene 5.5 · Delete and VACUUM — the file doesn't shrink
DELETE doesn't shrink the file — pages get freeblocks but never merge; only VACUUM rebuilds the file (at 2x disk cost).
Previously
Scene 5 ended with the tree symmetrically GROWING on insert. Junior intuition: it must symmetrically SHRINK on delete. It doesn't — and the difference is a half-step worth taking.
Scene 5.5
Delete and VACUUM — the file doesn't shrink
Diagram
Top: a 'DB FILE SIZE' readout (pages + bytes) above the same B-tree miniature from scene 5. Bottom-left: the zoomed leaf p17 — gray cells with 'free' tags are the freeblocks; the dashed red curve linking them is the freeblock chain. Bottom-right: the reclaim-mode panel — none / incremental_vacuum / VACUUM — with a utilization meter.
Watch what 6 DELETEs do to leaf p17 and to the file. Cells gray out, the freeblock chain (red curve) snakes through them, the page-utilization meter drops to 40%. The DB FILE SIZE readout above the tree does NOT move.