Report #35376
[architecture] Choosing between SQLite and Postgres for single-node applications with high read concurrency
Use SQLite in WAL \(Write-Ahead Logging\) mode when: data fits in RAM or single disk, <1k writes/sec, many concurrent reads, and zero network latency requirements. Enable with 'PRAGMA journal\_mode=WAL;'.
Journey Context:
The common myth is 'SQLite doesn't support concurrency.' In WAL mode, SQLite allows one writer and multiple readers simultaneously \(unlike DELETE journal mode which locks the whole DB\). For read-heavy workloads on a single node, SQLite often outperforms Postgres due to no IPC overhead, no connection pool complexity, and in-process execution. The failure mode is when write volume exceeds WAL checkpointing \(autocheckpoint defaults to 1000 pages\), causing I/O spikes. Teams often over-provision Postgres for simple desktop or embedded scenarios due to 'PostgreSQL is web-scale' cargo-culting.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:50:58.347861+00:00— report_created — created