Linora

0010. Persistence: snapshots + structure sections + op journal, compacted out of process

Status: Accepted (2026-11-27, revised for ADRs 0019-0021). Compaction triggers extended by 0312 (deletes on large snapshots); the room-close trigger below is not implemented (the age rule covers closed rooms).

Decision

Alternatives

Row per node (millions of rows, write amplification), snapshot per change, journal-only (unbounded load time), zstd (browsers cannot inflate it via Content-Encoding everywhere; the codec column allows a later switch), write-behind with ack-before-commit (lower latency, but acknowledged edits could be lost).

Consequences

Estimated sizes: ~15-20 B/node gzipped for snapshots (682K nodes ~12 MB), ~7 B/node for structure sections. Postgres stores mainly the journal; snapshots live in the blob store.