Storage, Execution & Recovery Internals

Pages, Records, and File Layout

Storage engines move fixed-size pages but store changing-size records. A slotted page separates stable logical slots from movable record bytes, so compaction can recover contiguous free space without invalidating every record identifier.
  • The page is the core transfer and recovery unit.
  • A record identifier names page plus slot.
  • Variable-width rows grow from the opposite end.
  • Logical free space differs from contiguous free space.
  • Oversized values need indirection.
  • Allocation metadata avoids scanning every page.
Slotted-page invariant
Layout mechanisms and consequences
MechanismPreservesCost / failure symptom
Slot directoryStable intra-page identityHeader overhead; damaged offsets corrupt interpretation
CompactionReusable contiguous spaceCPU/latches and extra dirtying
Overflow/external valueBounded base-page rowPointer chasing and orphan cleanup
Free-space mapFast insertion targetStale hints cause retries, not wrong data
Checksum/page LSNDetection/recovery orderingWrite overhead; torn/corrupt page becomes visible