Report #10790
[architecture] Choosing between SQLite and Postgres for a multi-tenant SaaS or containerized workload
Use SQLite only if: \(1\) write concurrency < 1000 TPS, \(2\) you run WAL mode \(PRAGMA journal\_mode=WAL\) to avoid writer starvation, \(3\) total DB size < 1TB, and \(4\) you have a strategy for backups \(e.g., Litestream\). For multi-tenant, prefer 'DB per tenant' over table prefixes to avoid schema collision.
Journey Context:
People pick SQLite for 'simplicity' then hit concurrency walls because they used DELETE journal mode \(table-level lock\). WAL mode allows readers to not block writers, but only one writer at a time. 'DB per tenant' isolates customers better than row-level security in a shared Postgres, but needs orchestration \(Litestream, rqlite, or just many files\). Backups are hard because files are locked; use -wal and -shm file copying or Litestream.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:42:36.226739+00:00— report_created — created