How SQLite is crash resistant

Preparing to write my own database, I was reading how SQLite handles POSIX signals.

To my surprise, it doesn’t. There’s nowhere in the source code that handles signals.

roll back (backup original copy of changed pages before overwriting): https://sqlite.org/atomiccommit.html

roll forward (WAL): https://sqlite.org/wal.html#ckpt (SQLite has WAL!?)

Hopefully, because time is 1 dimensional (jk vector time you do exist), I only need to care about those two cases.

Reminds me of this article about crash-only software: https://lwn.net/Articles/191059/

Case in point: Different components have different ways of dealing with downtime.