Turso is joining Supabase to give every agent its own database Read the news →

Turso vs Postgres

Postgres gives you one powerful database. Turso gives you one for every user, agent and tenant.

Both are relational and both speak SQL. They are built for different shapes of application, and this page shows you which shape yours is and how to decide.

No credit card.

Spot something out of date? Tell us on Discord.

Five things that set Turso apart

If any of these describe your application, Turso is worth a closer look.

A database for every user, agent and tenant

Create it through an API in the same call you create the user. No schema juggling and no row-level security policy to get wrong.

Nothing to wake and nothing to pool

A database is a file. There is no process to keep warm and no connection pooler in front of it.

On the server, the phone and in the browser

The same engine runs in your function, on the device and in a browser tab, with sync in between.

Isolation you can show a security review

Separate files and separate regions, with separate keys on the Pro plan. Deleting a customer means deleting a database.

Idle databases cost only storage

Run thousands of databases with most of them asleep and pay only for what they store.

Two relational databases, two different shapes of application

Postgres and Turso are both open-source relational databases. They make very different bets about where a database lives and how many of them you run.

Turso

Turso is an open-source, SQLite-compatible database written in Rust, plus Turso Cloud, a managed service built on it. A Turso database is a file, not a long-running process, so you can create one per user, tenant or agent, and the same engine runs in your server, on phones and in the browser.

Postgres

Postgres is a client-server database, with a backend process for each connection. Supabase offers managed Postgres alongside auth, storage, Edge Functions and realtime, so you can use just the database or a full backend.

Turso is part of Supabase. Use Turso for lightweight per-user or per-agent data alongside Supabase Postgres. For a branching-focused comparison, see Turso vs Neon.Explore Supabase Postgres

Where Turso makes the difference

Each difference below comes from how the two are built, and each one can be checked against the Postgres documentation and Turso's own pages.

01

A database for every user, agent and tenant

Turso

Turso treats a database as a file. Nothing runs when nobody is querying it, so an idle database costs only its storage, and you create one in the same API call that creates the user. Adaptive has created over 2 million databases, one per prompt and app version. Engine Labs runs tens of thousands of agent teams, each with its own database, on a $500 a month plan.

With Postgres

Postgres is built around one shared server. Each connection gets its own process, so most teams put a pooler in front of it, and multi-tenant apps usually separate customers with schemas or row-level security inside one database.

02

The database runs where your users are

Turso

Turso runs in-process on Linux, macOS, Windows and in browsers through WebAssembly. Turso Sync brings local-first reads and writes to the Turso Database engine, with explicit push and pull. libSQL Embedded Replicas provide a separate option for local reads.

With Postgres

Your app reaches Postgres over the network. Offline support means a second local data layer and a sync process of your own. PGlite puts Postgres in WebAssembly as a separate project.

“We kind of get local speed, but we know that it is going to be replicated and stored remotely, such that if that goes down, we still have the data.”

Matthias Pichler

Founding Engineer, Wordware (Sauna)

03

A boundary for every tenant

Turso

On the Pro plan, Turso Cloud supports per-database encryption with keys you hold. It also offers bring-your-own-cloud deployment on AWS and a region you choose per database. Deleting a customer means deleting a database.

With Postgres

Postgres gives you strong access control inside one database, including row-level security. Encryption at rest and data residency are handled by whoever hosts it, and every tenant shares the same keys and the same region.

Side by side, row by row

Turso is the better fit when your data is split across many users, agents or tenants, needs to live on the device, or needs a boundary per customer. Postgres is the better fit for one large shared dataset with many concurrent writers, deep extensions and reporting across every customer in one query. Spot something out of date? Tell us on Discord.

FeatureTursoPostgres
Unit of scaleMany small databasesOne server, scaled up, then replicas or sharding
Process modelIn-process. No server to run and no connection to poolOne backend process per connection, usually with a pooler in front
Creating a databaseAn API call, one per entityPossible, with per-database overhead on a shared server
Idle costStorage onlyA running server, unless the host scales it to zero
Write concurrencyMVCC with BEGIN CONCURRENT; concurrent writes in Turso Cloud (beta)Mature MVCC, proven under many writers
TypesDynamic typing with STRICT tables. No decimal type, so money is stored as integersRich static types, including NUMERIC, arrays, enums and JSONB
ExtensionsSQLite extensions, a smaller ecosystemVery large ecosystem, for example PostGIS, pgvector and TimescaleDB
Vector searchBuilt in, no extension, also on deviceThrough pgvector
Materialized viewsIncrementally maintainedManual refresh
Queries across all tenantsOne database at a timeOne query across every tenant in a shared schema
Per-database encryption with your keyYes, on the Pro planDepends on the host
Runs in your own cloud accountYes, BYOCDepends on the host
LeavingThe file is a valid SQLite database you can open anywhereStandard dumps and logical replication

Which shape is your application?

Both are good at what they were built for. The question is what your data looks like once you have users.

Choose Turso if

  • Each user, customer or agent should get its own database.
  • Data has to live on the device or keep working offline.
  • Most of your databases sit idle and you only want to pay for storage.
  • Each customer needs its own encryption key, region or cloud account.

Choose Postgres if

  • You run one large shared dataset with many concurrent writers.
  • You depend on extensions, stored procedures or exact numeric types across a complex schema.
  • You report across all customers in one query.
  • Your team and tools already speak Postgres and nothing above applies.

Use both if

Turso is part of Supabase. Keep shared business data in Supabase Postgres and give each user or agent a lightweight Turso database alongside it.

By the kind of team you are

AI agent platforms
Turso.A database per agent gives isolated memory, instant branching for rollback and near-zero idle cost.
App-builder and vibe-coding platforms
Turso.Create a database for every generated app or version, as Adaptive and Poke do.
Multi-tenant B2B SaaS
Turso when tenants need hard isolation, their own keys or their own region. Postgres when tenants share data and you report across all of them.
Local-first, mobile and desktop apps
Turso.Read and write locally, sync when the device is online.
Analytics-heavy or write-heavy monoliths
Postgres.One shared dataset with mature concurrency and a deep extension ecosystem.
Individual developers and side projects
Either.Turso's free plan includes 100 databases and 5 GB of storage. Postgres is the safer skill to learn if you only pick one.

The questions the threads keep asking

Can I use Turso and Postgres together?
Yes. Turso is part of Supabase, so a Turso database per user or agent can sit next to Supabase Postgres. Turso is also building a Postgres-compatible frontend on its Rust core, aiming for embedded deployment and sync; it is not a finished Postgres replacement.
How does Turso handle concurrent writes?
Enable MVCC and use BEGIN CONCURRENT so several connections can write simultaneously. Transactions that touch the same data can conflict and must retry. Concurrent writes on Turso Cloud are in beta. For a large shared dataset, Postgres remains a mature option.
How do I store money in Turso?
As integers in the smallest unit, the same way most payment systems do. SQLite has no decimal type, so a STRICT table with an INTEGER column for cents is the safe pattern. If you need decimal arithmetic inside the database, Postgres has NUMERIC.
Why not just use SQLite?
SQLite allows one writer at a time and has no built-in vector search. Turso adds native vector search, concurrent writes with MVCC, encryption, change data capture, async I/O and cloud sync, with an open contribution model.
Does Turso have edge replicas?
Edge replicas are deprecated for new users. For new local-first apps, use Turso Sync on the Turso Database engine, with local reads and writes and explicit push/pull. libSQL Embedded Replicas are a separate, supported option for local reads with writes sent to the cloud primary.
Can Turso run in my own cloud account?
Yes. Turso Cloud BYOC (Bring Your Own Cloud) runs Turso in your own AWS account, so data can stay in the cloud account your customers control.

Try the many-database model on your own workload.

100 databases free. No credit card. Keep Postgres for what it does best.