ADR-0024 — No index on the head row's last-write time
- Status: Accepted
- Date: 2026-11-13
- Supersedes: none
- Authors: project maintainers
Context
The sweeper finds idle threads by their head row's last-write time. Every root put updates that
column. An update that changes no indexed column can be a HOT update, which writes no index entry.
Decision
There will be no index on the last-write time, so every head update stays a HOT update. Revisit only if the sweep's measured cost needs it.
Alternatives considered
- Index it — rejected: every root
putbecomes a non-HOT update.
Consequences
- The sweeper scans the head table, one small row per thread. Every head-row update in the write
cost benchmark was HOT, and 50 idle threads of 1 MB went in one sweep in 226–262 ms (
measuredbefore public release; fence-and-expiry.md §5.1).
References
src/open_postgres_checkpointer/_migrations.py