SQLite vs Postgres comes down to where the database runs, not how big it gets. Use SQLite while one application process on one machine owns the data file. Switch to Postgres when a second server, a separate service or a person with a SQL client needs to write over a network. If you're unsure you'll stay on one machine, start on Postgres.
Which one should you start on?
Start on Postgres if the app will have a second server, a worker on another machine or a team connecting with tools. Start on SQLite for a single-server app, an internal tool or an embedded product. Plan the switch around deployment shape, not data size. We'd start on Postgres for anything with a team and a roadmap.
| Situation | Start on | Why |
|---|---|---|
| One app server on one VM | SQLite | One process owns the file, and there's nothing to operate. |
| Two or more app servers | Postgres | Every server writes, and WAL won't work over a network filesystem. |
| Background worker on another machine | Postgres | Two hosts writing means a client/server database. |
| Many people running ad-hoc SQL | Postgres | Clients connect over a network, and SQLite is a file. |
| Multi-tenant SaaS with per-tenant data | Postgres | Our take: one shared database, one schema to migrate. |
| Edge or serverless on Cloudflare | D1 | Per-database size and throughput caps. |
| Read-heavy content site | SQLite | Readers don't block the writer in WAL mode. |
If your data is document-shaped, here's how Postgres handles flexible document data with JSONB, so you don't need a second database for it.
Why does SQLite fail the second server, and not the first?
SQLite breaks the moment two machines need to write the same file. The first server is fine because everything happens inside one host.
SQLite's own guidance on appropriate uses puts it bluntly: SQLite doesn't compete with client/server databases, it competes with fopen(). It allows unlimited simultaneous readers but only one writer at any instant. That's tolerable on one machine.
Write-ahead logging, the mode we'd use for most apps, improves things. Readers don't block the writer and the writer doesn't block readers. But the SQLite documentation on WAL is explicit about the cost: every process using the database must be on the same host, and WAL doesn't work over a network filesystem. There's only one WAL file, so there's still only one writer at a time.
That's why putting the file on shared storage and pointing a second server at it isn't a fix. SQLite's guidance says that if many client programs send SQL to the same database over a network, use a client/server engine. Postgres is that engine.
How much traffic can one SQLite file take?
More than most new products will ever see. The SQLite project says any site under 100K hits a day should work fine, and calls that a conservative estimate. It has been shown to work with ten times that.
The caveat is in the same passage. If the site is write-intensive, or so busy that it needs multiple servers, SQLite's authors suggest a client/server database. Hits per day is the wrong thing to watch. Watch whether you need a second machine.
What does a worked example look like: one VM, then a second server?
Take a B2B dashboard app on one VM with 50,000 page hits a day. That's about 0.6 hits a second on average, well inside the 100K figure. Your peak is the number to measure.
Now the team grows and adds a second app server behind a load balancer. Both servers must write the same data. As covered above, the file can't simply be mounted twice. The move is to a client/server database, and the connection string is the visible part:
before: DATABASE_URL=sqlite:///var/app/data.db
after: DATABASE_URL=postgres://app:secret@db.internal:5432/appMoving the schema and queries is where the time goes. To size that for your app, dump the schema, run your test suite against a local Postgres in Docker and count the failures.
What is new in 2026 that older comparisons miss?
Three things are new in 2026: current release dates, a proper backup story for single-server SQLite, and a serverless option on Cloudflare.
Current releases
SQLite's release history lists 3.54.1 as the latest, dated 16 October 2026. PostgreSQL 19.0 reached general availability on 19 November 2026, and the project's versioning policy gives every major five years of support, so 19 runs to November 2031.
Postgres isn't going anywhere: version 18 is supported until November 2030. Starting on 19 gives a new service five years before its first forced major upgrade. If you're comparing it against another relational database, see PostgreSQL's support lifecycle against MySQL's.
Back up and restore SQLite with Litestream
Litestream fixes backup, not a second writer. It streams SQLite changes to cloud storage or local files, runs as a separate process and restores you to the latest replicated transaction if the server dies. Its own tagline is to safely run your application on a single server.
That makes one-VM SQLite far less scary. You can recover a dead machine without changing application code. You still can't point two servers at it.
Serverless on Cloudflare: D1
Cloudflare's D1 has its own ceiling. According to Cloudflare's limits page, each D1 database is single-threaded and runs one query at a time. Throughput is therefore 1,000 divided by your average query time in milliseconds.
A 1 ms query allows at most 1,000 queries a second. At 100 ms you get ten. A database tops out at 10 GB on Workers Paid and 500 MB on Free. So slow queries cap throughput per database, the same one-at-a-time shape as a single SQLite writer.
What do you give up by starting on Postgres?
You give up simplicity: a server or managed service to run, connection handling to think about and a Postgres container in your dev setup. That's a real cost for a weekend project and a small one for a product with a roadmap.
In exchange, you skip the migration. If you suspect you'll outgrow one machine, we'd pay the setup cost now rather than rewrite later. If Postgres later stops fitting one job, Postgres alternatives for specific jobs covers when to leave.
Downsides of SQLite: what actually bites?
Two do, both covered above: one writer and one host.
The theoretical size cap is 281 terabytes, so ignore it. A subtler problem is checkpoint starvation. If readers never stop, WAL checkpoints can't complete and the WAL file grows without bound. It only bites on busy databases with overlapping long readers, so watch WAL file size if you run long reads.
Dev on SQLite, production on Postgres: why it goes wrong
Don't do it. Behaviour differences between the two engines, such as typing and SQL dialect, can stay invisible until real data hits real queries in production, where they're most expensive. Our recommendation is to run Postgres in Docker locally and keep one engine across every environment.
What this means for your database choice
Decide by deployment shape. Ask three questions:
- Will a second process on another machine write to the database?
- Will people connect with a client, not through your app?
- Will you need read replicas or failover beyond one restorable server?
If any answer is yes, start on Postgres now. If all are no, SQLite on one VM with Litestream is a sound choice, and the first yes later is your trigger to move. Moving on a planned date is easier than moving during an outage.
Once you've picked Postgres, the next decision is where it runs. Here's Neon against Supabase for hosting managed Postgres.
FAQ
Is SQLite good enough for production?
Yes, for one application process on one machine. SQLite's authors say sites under 100K hits a day should work fine. It stops being enough when a second server needs to write the same data, or when many clients connect over a network.
What are the downsides of SQLite?
One writer at a time, and every process must be on the same host because WAL doesn't work over a network filesystem. Busy databases can also suffer WAL checkpoint starvation when readers never stop.
Is SQLite still relevant?
Yes. SQLite 3.54.1 shipped in October 2026, and Litestream builds on it. It fits single-server apps, internal tools and embedded products.
Is PostgreSQL obsolete?
No. PostgreSQL 19 reached general availability on 19 November 2026 and is supported for five years. Version 18 is supported until November 2030.
Can I migrate from SQLite to Postgres later?
Yes, but plan a schema pass and a test-suite pass. Run your tests against a local Postgres in Docker and count the failures to size it.
