Report #48823
[architecture] When to choose SQLite over PostgreSQL for web applications
Use SQLite with WAL \(Write-Ahead Logging\) mode enabled for read-heavy workloads \(<1000 writes/second\), zero network latency requirements, and when the app server colocates with the database file; avoid for high-write concurrency, fine-grained access control, or distributed read replicas.
Journey Context:
Developers reflexively choose Postgres for 'serious' applications due to fear of SQLite's 'database is locked' errors, but in WAL mode, SQLite handles hundreds of concurrent readers and a single writer with microsecond latency—often outperforming networked Postgres for low-concurrency apps. The mistake is using the default rollback journal mode or treating SQLite as a toy. The critical tradeoff is the lack of user management, stored procedures, and horizontal read scaling; if you need more than one writer thread saturating the disk, switch to Postgres.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:26:04.863438+00:00— report_created — created