SQLite (with WAL) doesn’t do `fsync` on each commit under default settings
SQLite has a WAL mode (the default is journal mode), but you’re likely using it if you want higher write throughput. SQLite also has a PRAGMA called synchronous which configures how fsync is called. The default is NORMAL. This is what the docs say:[..] but WAL mode does lose durability. A transaction committed in WAL mode with synchronous=NORMAL might roll back following a power loss or system crash.In WAL mode when synchronous is NORMAL (1), the WAL file is synchronized before each checkpoint and the database file is synchronized after each completed checkpoint and the WAL file header is synchronized when a WAL file begins to be reused after a checkpoint, but no sync operations occur during most transactions.If durability is not a concern, then synchronous=NORMAL is normally all one…