Transaction Correctness Guide Turso uses WAL (Write-Ahead Logging) mode exclusively. Files: , (no - Turso uses in-memory WAL index) WAL Mechanics Write Path 1. Writer appends frames (page data) to WAL file (sequential I/O) 2. COMMIT = frame with non-zero db size in header (marks transaction end) 3. Original DB unchanged until checkpoint Read Path 1. Reader acquires read mark (mxFrame = last valid commit frame) 2. For each page: check WAL up to mxFrame, fall back to main DB 3. Reader sees consistent snapshot at its read mark Checkpointing Transfers WAL content back to main DB. Checkpoint types…