The database for a multi-tenant SaaS

Postgres meets the needs that matter most for 200 business customers: isolation the database enforces, failover, and reporting. Switch on what you need; the options that cannot give it fade.

Meets all of them: Postgres.
OptionIsolation enforced by the databaseFailover without a restoreReporting on live dataTransactional migrationsLeast to operate
PostgresYesrow-level securityYesmanaged standbyYesmaterialized views, replicasYesDDL inside a transactionPartialmanaged service
MySQLNotenant filter in app codeYesmanaged standbyPartialno materialized viewsNoDDL commits implicitlyPartialmanaged service
SQLite + LitestreamPartialone file per tenantNorestore on a new hostPartialshares the app's hostYesDDL inside a transactionYesruns inside the app
SQLite on TursoPartialdatabase per tenantPartialhosted, read the SLAPartialremote, thin toolingYesDDL inside a transactionYeshosted

Load does not decide

Each option handles a small SaaS's writes on one machine. Move the sliders to see how far the load has to grow before SQLite's single writer is the limit.

4,000 users, a fifth active at peak: 80 writes/s, 16% of SQLite's ceiling.

    GuessedCeilings are planning figures for small commits on a cloud SSD (SQLite in WAL mode, a modest Postgres or MySQL instance), not benchmarks. Measure your own workload before relying on them.

    What a failed host costs

    The options differ in what happens when the machine dies, not in how fast they run.

    SQLite on TursoSQLite + LitestreamPostgres or MySQL, managedcopies every commitpromoted on failurestreams changesrestore on a new hostAppPrimaryStandbyApp + SQLite fileone hostObject storageAppHosted primaryReplicas

    Postgres and MySQL keep a standby that takes over. Litestream keeps a continuous backup, so a host failure means a restore, and writes after the last sync are lost (Litestream). On Turso, the vendor runs the replication; read its terms for what it promises.

    How would isolation work with one database per tenant?

    Each customer gets its own SQLite file or Turso database, so one tenant can never read another's rows, and a customer's data is easy to export or delete. The cost is operational: every migration runs 200 times, and reports across customers need a separate store.

    Postgres and MySQL can also give each tenant a schema, with the same migration cost. Postgres's row-level security keeps one shared schema and still has the database refuse cross-tenant reads (PostgreSQL docs).

    Pick a database

    Postgres is recommended: it is the only option here that meets isolation, failover and migrations without a compromise. Switch to SQLite if a restore after an outage and a single host are acceptable for the first year.

    OptionWins whenCosts you
    Isolation, failover and reporting in one engineA managed service to pay for
    The team already knows itIsolation and migrations left to discipline
    Fewest moving parts, fastest readsDowntime and lost writes on a host failure
    SQLite's model without running the hostA young vendor and one database per tenant

    Basis

    The matrix is the page's own reading of the documentation: row-level security in Postgres, implicit commits in MySQL, SQLite's one writer in WAL mode, when SQLite fits, Litestream and Turso. Product features change; check the version you will run.