postgres=# select * from sessions where video_id = 'Ib3SXSFt8mE';

Index bloat and B-tree page merge, part 2

· 75:39 · Storage internals

Continue B-tree page-merge design and prototype.

session summary

The session established why sparse B-tree pages matter: they increase buffer churn, WAL full-page images, replica storage, and the cost of scans. The group then traced vacuum's existing half-dead page deletion and studied whether a merge could resemble a split. Moving tuples directly exposed a duplicate-read race for concurrent scans, implying a two-phase protocol that removes the parent downlink before relocation. By the end they identified split/finish-split as the code to reverse, but deferred implementation pending a sound scan protocol.

timecodes

  1. Operational costs of sparse B-tree pages
  2. Why Postgres has reindexing but no page merge
  3. Can merge be shaped like an existing page split?
  4. Tracing vacuum and half-dead page deletion
  5. Moving tuples into a sibling before deletion
  6. Concurrent scans expose duplicate reads
  7. A two-phase merge and scan-awareness requirement
  8. Reversing finish-split becomes the next design step