Skip to content

Instantly share code, notes, and snippets.

View adsharma's full-sized avatar

Arun Sharma adsharma

View GitHub Profile
@adsharma
adsharma / mvcc-retention-1184-design.md
Created October 12, 2026 03:52
Phase-0 design: full MVCC version retention for LadybugDB#1184 (snapshot horizon, selective checkpoint retention)

Phase-0 Design Doc — Full MVCC Version Retention for #1184

Field Value
Issue LadybugDB/ladybug #1184 — read-only txn loses snapshot on CHECKPOINT
Phase 0 (design only, no code)
Direction Full MVCC version retention: never delete data that open read transactions need (Postgres oldestXmin / snapshot-horizon approach)
Rejects PR #1202 wait/fail checkpoint semantics (branch issue-1184, head 7eca5b6b5) — checkpoint liveness is non-negotiable
Worktree /home/ubuntu/src/ladybug/tmp/worktrees/dev-loops/issue-1184 (read-only this phase)
attach 'props.db' as props;
select type, count(type) as cnt, l.value
from relations r
join props.labels l on r.type=l.property
group by type, l.value
order by cnt desc
limit 200;
BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" }
{
len = length($0);
if (len == 5) {
for (i = 1; i <= len; i++) {
c = substr($0, i, 1);
ltr = index(LETTERS, c);
if (ltr > 0) {