The SQLite against PostgreSQL argument usually gets framed as small project against serious project, which is the wrong axis and leads people to run a database server they never needed. The question that actually decides it is how many separate machines need to write to the data at the same time.

The structural difference

SQLite is a library. It runs inside your application's process and reads and writes a single file on disk. There is no server, no port, no connection string and nothing to start.

PostgreSQL is a server. It runs as its own process, your application connects to it over a socket, and several applications on several machines can connect at once.

Everything else follows from that one difference.

Concurrency, which is the real constraint

SQLite allows many readers, one writer. In WAL mode (write-ahead logging, which you should turn on) readers do not block the writer and the writer does not block readers, so read-heavy applications go much further than the reputation suggests. But two writes cannot proceed at once; the second waits.

PostgreSQL uses MVCC and handles many concurrent writers properly, which is what you need when several application servers sit behind a load balancer.

So the dividing question is not traffic volume. A single server handling substantial read traffic with occasional writes is comfortably SQLite territory. Three application servers all writing is not, at any volume.

When SQLite is the better choice

  • One application server. Most small and medium web applications, and a good number of large ones.
  • Read-heavy workloads. Content sites, documentation, catalogues, analytics read models.
  • Desktop, mobile and embedded software. There is no realistic alternative.
  • Command-line tools and local utilities. A file the user can copy, back up or delete.
  • Test suites. An in-memory database per test run is fast and needs no fixtures to tear down.
  • Edge deployments. Data next to the code, with no network round trip.

What you get back is substantial: no server to operate, no connection pool to tune, no network latency on every query, and a backup that is a file copy.

When PostgreSQL is the better choice

  • Several machines writing. The decisive one.
  • Sustained concurrent writes. Queues, high-frequency ingestion, anything where writes contend.
  • Replication and point-in-time recovery. Built in, and genuinely hard to replicate otherwise.
  • Rich types and extensions. Native JSON operations, arrays, full-text search, PostGIS for geospatial, pgvector for embeddings.
  • Database-level permissions. Different users with different rights, enforced by the database.
  • Very large datasets with query plans that need tuning.

If you are building retrieval over embeddings, pgvector alone often settles it — see PostgreSQL in the cloud era.

Things people get wrong about SQLite

  • "It has no types." It has dynamic typing, and modern versions support strict tables when you want enforcement.
  • "It cannot handle real traffic." Read traffic, it very often can. The ceiling is concurrent writes.
  • "It is not durable." It is fully ACID. The common problem is a configuration that trades durability for speed, not the engine.
  • "Migrations are impossible." ALTER TABLE is more limited, and the standard workaround — create, copy, swap — is what migration tools already do for you.

How to decide, in one question

Will more than one machine write to this database?

  • No, and it will stay that way: SQLite. Enable WAL, keep the file on local disk rather than a network mount, and move on.
  • Yes, or probably soon: PostgreSQL. Start there instead of migrating under pressure later.
  • Genuinely unsure: SQLite, behind a thin data layer. Migrating a small schema later is a day's work; operating a server you did not need costs you every week.

If your comparison is between the two server databases instead, we cover that in PostgreSQL vs MySQL.

Written by the WritePures newsroom. Spotted something that needs updating? Tell our editors.