{"id":"wal-truncation-safe-when-linear","text":"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).","truth_value":"IN","source":"","source_url":"","source_hash":"","justifications":[{"type":"SL","antecedents":["wal-truncate-deletes-oldest-first","wal-truncate-fsyncs-before-scan"],"outlist":["wal-truncate-not-crash-safe"],"label":"Oldest-first ordering plus pre-scan fsync provide truncation safety, gated on the truncation operation itself not being crash-safe (no atomic rename pattern)"}],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"wal-truncation-safe-when-linear","truth_value":"IN","reason":"SL justification valid","antecedents":["wal-truncate-deletes-oldest-first","wal-truncate-fsyncs-before-scan"],"label":"Oldest-first ordering plus pre-scan fsync provide truncation safety, gated on the truncation operation itself not being crash-safe (no atomic rename pattern)","outlist":["wal-truncate-not-crash-safe"]},{"node":"wal-truncate-deletes-oldest-first","truth_value":"IN","reason":"premise"},{"node":"wal-truncate-fsyncs-before-scan","truth_value":"IN","reason":"premise"}]}}