Report #92449
[architecture] Choosing between SQLite and PostgreSQL for single-node applications
Use SQLite for single-node deployments with <1000 concurrent connections, read-heavy workloads, and where operational simplicity \(zero config, file-based backup\) outweighs the need for granular locking, network access, or complex access control; otherwise use PostgreSQL.
Journey Context:
PostgreSQL is overkill for many applications. SQLite runs in-process, eliminating network latency and configuration management. It supports ACID via WAL mode and handles GB-sized databases efficiently. The myth that 'SQLite doesn't scale' is false for single-node apps; rather, it has specific constraints: one writer at a time \( WAL mode allows readers during writes\), no user management, and corruption risk on network filesystems \(NFS\). For a small team without a DBA, SQLite's operational simplicity is a superpower: backups are \`cp\`, upgrades are binary swaps, and there's no connection pooling hell. The critical mistake is using SQLite with high write concurrency \(contention on the write lock\) or on network drives \(locking issues\). Switch to Postgres when you need: row-level security, listen/notify, parallel query execution, or horizontal read replicas.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:45:55.048583+00:00— report_created — created