r/Python • • 14m ago

Discussion SQLite (WAL mode) vs Postgres in small production Python services: real cutoff points

Every time I spin up a small internal API, webhook receiver, or background worker on a single VPS, I end up having the same debate with myself.

With `PRAGMA journal_mode=WAL`, `busy_timeout=5000`, and `BEGIN IMMEDIATE` for writes, SQLite handles way more concurrent traffic than people give it credit for, and backups are just a single `.backup` file with zero extra containers or connection pools to babysit. Even FTS5 covers basic full-text search without adding another service.

On the other hand, the moment you need multiple app nodes writing to the same DB, heavy concurrent write bursts, or proper role-based permissions, migrating off SQLite mid-flight is annoying enough that starting on Postgres feels safer.

For folks running small-to-medium Python services in prod: what's your actual rule of thumb for sticking with SQLite vs starting straight on Postgres?

0 Upvotes

1 comment sorted by

•

u/wandererobtm101 Pythonista 7m ago

Depends on what your definition of small to medium is…. And your other requirements. Not really a python thing