Storage, Execution & Recovery Internals
Space Reclamation and Maintenance
Deletes and updates usually make bytes logically obsolete before they become physically reusable. Reclamation must prove that no active snapshot or recovery/replication consumer needs an old version, then prune, compact, vacuum, merge, or rewrite while controlling bloat and foreground interference.
- Logical death precedes physical reuse.
- Page pruning and file shrinking are different.
- Long snapshots pin history.
- Bloat amplifies unrelated work.
- Compaction moves bytes and consumes resources.
- Maintenance must outrun garbage creation.
| Action | Reclaims | Usually does not guarantee | Risk |
|---|---|---|---|
| Prune/garbage collect | Dead record/version references | Smaller file | CPU/latch contention |
| Vacuum/merge | Reusable pages/segments and metadata | OS space return | I/O/WAL backlog |
| Truncate tail | Empty trailing blocks | Internal-hole removal | Lock/horizon constraints |
| Rewrite/repack | Dense new physical copy | Cheap online operation | Space, WAL, lock and replica load |