Report #9835
[architecture] Choosing between SQLite and Postgres for small-to-medium web services
Use SQLite with WAL \(Write-Ahead Logging\) mode enabled for read-heavy workloads with low write concurrency \(<1000 TPS\) where a single application instance controls the database. Switch to Postgres when you need multiple concurrent writers, row-level locking, sophisticated access control, or horizontal read replicas.
Journey Context:
SQLite is not merely a 'testing database.' With WAL mode, readers don't block writers and writers don't block readers, but only one writer can proceed at a time \(database-level lock\). This is optimal for edge computing, embedded systems, or single-tenant web apps where write contention is rare. The tradeoff is simplicity \(zero config, single file\) vs. concurrency scaling. Do not use SQLite over NFS or with multiple machines accessing the file—it corrupts. Postgres adds operational overhead \(connection pooling, vacuuming\) but is mandatory for multi-writer OLTP.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T09:13:34.022641+00:00— report_created — created