wal-truncation-safe-when-linear

Status: IN

WAL truncation maintains data safety through two complementary mechanisms: segments are processed in oldest-first order (so a crash mid-truncation leaves a contiguous suffix of segments), and the current WAL file is flushed and fsynced before scanning for records to remove (preventing buffered data from being lost).

Justifications

Oldest-first ordering plus pre-scan fsync provide truncation safety, gated on the truncation operation itself not being crash-safe (no atomic rename pattern)

Depends on (SL): wal-truncate-deletes-oldest-first, wal-truncate-fsyncs-before-scan

Unless: wal-truncate-not-crash-safe

JSON