Report #28675
[architecture] When to choose SQLite over PostgreSQL for production workloads
Use SQLite with WAL mode enabled for read-heavy workloads under 1GB data, single-node apps, serverless edge functions, or tools requiring zero ops overhead. Switch to Postgres when you need concurrent writes >1K TPS, complex auth/row-level security, data >10GB, or logical replication.
Journey Context:
The common misconception is 'SQLite is not production-grade.' With WAL \(Write-Ahead Logging\) mode enabled, SQLite supports high read concurrency and crash safety suitable for many web apps. It excels in 'serverless' contexts \(e.g., Cloudflare D1, LiteFS for distributed SQLite\) because the database is just a file—no TCP socket overhead. However, SQLite locks the entire database file on write; high write concurrency creates queueing latency. Postgres wins on complex access control \(RLS\), JSONB querying, and horizontal read scaling via streaming replication. The decision hinge is write concurrency and operational complexity tolerance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:31:40.124754+00:00— report_created — created