One Postgres, a database per user, or both?
Choosing between one Postgres database, a Turso database per user, or both comes down to where data must live, who owns it, and how many features need to read across users.
Topics Data & databases
SQLite and SQLite-based systems.
Choosing between one Postgres database, a Turso database per user, or both comes down to where data must live, who owns it, and how many features need to read across users.
Turso Sync replaces libSQL's page-based Embedded Replicas with logical row-level changes captured via CDC in Turso Database, a Rust rewrite of SQLite, so reads and writes stay local and apps call push() and pull() explicitly.
Neon and Turso both support a database per agent but differ in the unit: Neon gives each agent a Postgres project with its own autoscaling compute that suspends after 5 minutes idle and is billed by CU-hour, while Turso treats each SQLite-compatible database as a file managed by a shared server, billed by rows read/written and storage with unlimited databases on paid plans.
Turso Database, a Rust rewrite of SQLite, has built-in change data capture enabled with a single PRAGMA.
Sauna, a proactive AI work assistant, gives every session, agent and connected inbox or calendar its own Turso database, creating about 90,000 databases a day and over 2 million in total.
Turso Cloud's paid plans no longer meter active databases, so a database costs only its storage while idle.
Turso's MVCC, modeled on Hekaton, tracks each row as a chain of versions in a lock-free SkipMap, with begin/end fields holding a TxId while a transaction is active and a commit timestamp once it commits.
A multiplayer chat agent built on Pi Durable maps each agent session to one SQLite-backed Cloudflare Durable Object, so idle agents hibernate instead of holding a running machine.
Shared schema with row-level security, schema per tenant, and database per tenant trade off isolation strength against operational cost.
Toasty, the async Rust ORM from Tokio's creator, now supports Turso in three modes behind one API: local files with optional concurrent writes (transactions automatically wrapped in BEGIN CONCURRENT), a serverless remote mode over HTTP with URL and auth token, and local-first sync with explicit pull/push calls.
Turso v0.8 adds group commit to its MVCC write path so that concurrent committers share a single fsync of the logical log instead of each paying for their own.
Turso 0.8 targets SQLite's single-writer bottleneck with BEGIN CONCURRENT, an MVCC mode where transactions start independently and commit in groups.
Production SQLite encryption with Turso fails most often at the key, not the cipher.
Turso offers two SQLite encryption models: native, open-source page-level encryption in its Rust rewrite of SQLite (still behind an --experimental-encryption flag, hex keys) and production-ready BYOK on Turso Cloud, where a base64 key is supplied per connection and never persisted by Turso.
SQLite ships without encryption, and since SQLite 3.32.0 removed the undocumented SQLITE_HAS_CODEC hook in 2020, the options are SQLCipher (mature but painful across major versions, AES-256-CBC+HMAC only), the proprietary $2,000 SEE from the SQLite team, and SQLite3MultipleCiphers (community successor that can read SQLCipher formats).
Turso's BEGIN CONCURRENT replaces SQLite's single-writer lock with Hekaton-inspired optimistic MVCC that detects conflicts at commit time and at row granularity, rather than the page-level detection in SQLite's unmerged experimental branch.
The standard warning against database-per-tenant assumes each database is a server process like PostgreSQL or MySQL, with its own memory, connection pool and backup schedule.
SQLite, especially via Turso Cloud, can replace PostgreSQL or MySQL for read-heavy, moderate-write workloads, trading complex-JOIN optimization, stored procedures, rich types and native replication for simpler operations, lower cost and local reads.
Turso Cloud now offers concurrent writes in early preview: transactions opened with BEGIN CONCURRENT run optimistically in parallel on an MVCC engine modeled on Microsoft's Hekaton, with conflicts detected at commit time at row granularity.
Turso Sync brings local-first behaviour to SQLite-based apps.
Giving each AI agent its own SQLite-style database, instead of sharing tables keyed by tenant_id or using schema-per-tenant, makes isolation, debugging and cleanup trivial: deleting an agent is a single API call.
Turso compiles unmodified Doom C source to SQLite's VDBE bytecode by using LLVM as a frontend and a custom backend, vdbecc, that lowers LLVM IR to VDBE.
Turso, a Rust rewrite of SQLite, is adding a Postgres frontend by parsing Postgres SQL into a common AST and compiling it to Turso's VDBE bytecode, turning the engine into an "LLVM of databases" with pluggable frontends.
Turso's SQLite-compatible engine with native vector columns, paired with Voyage AI embedding and reranking models, replaces a multi-service RAG stack with a single embeddable database for agent retrieval and memory.
Turso 0.7 drops the beta label and focuses on performance and robustness for embedded, multi-tenant use: the core no longer blocks on I/O, yields CPU via a new StepResult::Yield, moves to fallible allocation so OOM surfaces as an error, and treats the page cache as a soft limit like SQLite.
Turso, a from-scratch SQLite rewrite, is adding formal verification via Aretta AI's Aristo, which turns natural-language intents annotated on code into formally checked properties, to complement its deterministic simulation testing and Antithesis runs.
Alien's pull-mode BYOC operator, which runs inside customer cloud accounts and must survive restarts, network loss and half-applied deployments, replaced hand-rolled JSON state files with an embedded, encrypted Turso database.
A local secrets vault for coding agents can be built as a single encrypted Turso database.
Eden, a gateway and control plane for database, API and AI traffic, uses Turso's in-process SQLite-compatible storage with AES-256-GCM whole-database encryption so a single Rust binary can run beside the workloads it governs without a separate Postgres.
Turso runs LLM coding agents (Claude Code with the Ralph Loop plugin) for days at a time to autonomously find SQL correctness bugs.
Two ASP.NET services (an Order API and a Payment Service backed by SQLite via EF Core) are instrumented with OpenTelemetry and export traces, logs and metrics over OTLP/gRPC to ClickStack, a ClickHouse-based observability stack run in Docker Compose.
Modeling individual SQLite C API contracts in Quint, generating small traces, and replaying them as C programs against real SQLite uncovered more than 10 SQLite bugs while also validating Turso's compatible C API.
Turso 0.6 is the first release supporting all major SQLite features, adding experimental multi-process WAL access (OFD locks on Linux, fcntl elsewhere, IOCP on Windows) and VACUUM/VACUUM INTO.
Sample Vault, an AI sample browser for music producers, gives each premium user a dedicated Turso database.
Turso, a Rust rewrite of SQLite, replaces libSQL's Embedded Replicas with a sync model built on change data capture, shipping logical changes instead of physical pages and splitting sync into separate push() and pull() operations.
Turso used Antithesis's new property-based testing library Hegel to check that its two TypeScript drivers, the native @tursodatabase/database and the pure-JS @tursodatabase/serverless, expose the same API and return identical results.
Etsy moved shard routing for its ~1,000-table, ~1,000-shard, 425 TB MySQL cluster (1.7M requests/sec) from an ORM that looked up random shard mappings in a single index database to Vitess vindexes, without moving any data.
Turso v0.5.0 promotes MVCC-based concurrent writes (BEGIN CONCURRENT, adapted from Hekaton) to beta.
Codemogger is an open-source code indexer and search engine for AI agents, built on a single local Turso (SQLite-compatible) file using native vector columns and full-text search.
Memelord, a per-project agent memory system built on Turso, plugs into OpenClaw through mcporter.
Memelord is a fully local memory system for coding agents that keeps a per-project SQLite database (via Turso) of corrections, insights and user-requested memories, embedded with all-MiniLM-L6-v2 and retrieved by cosine vector search at task start.
Turso's partial sync replicates a subset of SQLite database pages into Vercel Functions so reads run in-process with no network round-trip, while writes go to the remote Turso database for durability and consistency.
Bring-Your-Own-Key encryption, previously Enterprise-only, is now available to self-service Turso Cloud customers starting on the Pro Plan.
`@tursodatabase/sync-react-native` is a single package that gives React Native apps on iOS and Android an embedded, SQLite-compatible Turso database plus optional bidirectional sync with Turso Cloud via `pull` and `push`, enabling offline-first apps.
Litestream's SQLite VFS now supports an optional write mode and background hydration, built so the Sprites storage stack can serve reads and writes milliseconds after a cold boot without first downloading its JuiceFS block map from object storage.
TursoDB adds native full-text search by embedding Tantivy and implementing its Directory trait on top of Turso's B-tree, storing index "files" as 512KB chunks in an internal table.
Turso v0.4.0 overhauls its experimental MVCC mode, which lifts SQLite's single-writer limit, adding index support, checkpointing and recovery.
just-bash, a from-scratch TypeScript reimplementation of bash and common commands like grep, sed, awk and jq, gives AI agents a familiar shell tool without a real shell or host filesystem access.
AgentFS 0.4 adds `agentfs run`, which launches a coding agent in a sandbox where the working directory is a copy-on-write overlay.
AgentFS gives browser-based agents a virtual filesystem stored in a SQLite database, using Turso's WASM build of its Rust rewrite of SQLite.
Litestream VFS is a SQLite VFS plugin that runs read-only queries directly against Litestream backups in S3 without downloading the whole database, and supports point-in-time queries via a `PRAGMA litestream_time` setting.
AgentFS adds an `agentfs mount` command that exposes its SQLite-backed agent filesystem as a real POSIX filesystem via Linux FUSE.
AgentFS is an SDK that stores all of an AI agent's state in a single SQLite (Turso) database file: a POSIX-like virtual filesystem, a key-value store, and an append-only tool call audit log.
Turso 0.3.0 adds a compact sparse vector representation (vector32_sparse) that uses 5–50x less storage than dense vectors, plus an inverted index for nearest-neighbor search by weighted Jaccard distance.
Corrosion is Fly.io's open-source service discovery system: a Rust program that propagates a SQLite database across thousands of workers via SWIM gossip and QUIC, using the cr-sqlite CRDT extension with last-write-wins logical timestamps instead of distributed consensus.
Turso's SQLite-compatible database can run entirely in the browser via WebAssembly, persisting data to OPFS with no backend.
Turso adds experimental Live Materialized Views to its SQLite-compatible database, using Incremental View Maintenance based on the DBSP framework so views update in time proportional to the size of changes rather than the base tables.
Turso, a from-scratch SQLite rewrite, now runs in the browser via WebAssembly as the npm package @tursodatabase/database-wasm, with a better-sqlite3-like API whose methods are all async because of OPFS.
Turso Sync lets local SQLite-compatible Turso databases, in Node or in the browser via WASM, sync with Turso Cloud through push, pull and sync-aware checkpoint methods layered on the standard database API.
Turso Database, a Rust rewrite of SQLite, now supports native encryption at rest using AEAD ciphers (AEGIS-256 and AES-GCM).
Turso implements SQLite-compatible BEGIN CONCURRENT using Hekaton-style MVCC, which removes SQLite's single-writer bottleneck and the SQLITE_BUSY errors that come with it.
Litestream v0.5.0 replaces WAL-segment backups with the LTX file format from LiteFS, enabling efficient point-in-time recovery through hierarchical compaction (30-second, 5-minute and hourly levels), so a restore typically needs only a dozen or so files.
SQLite re-parses the entire sqlite_schema table after every ALTER TABLE, so schema changes cost time proportional to total schema size even when only one table is touched.
Turso, a Rust rewrite of SQLite, hit a bug where every write after the database crossed 1GB made SQLite's integrity checks fail, even though Turso's own checks found the file intact.
Turso 0.1.3 adds read-only `ATTACH DATABASE`, letting a single session join across multiple SQLite databases without SQLite's default limit of 10 attached databases (hard maximum 125).
SQLite re-reads and parses the sqlite_schema table on every new connection, so opening a connection to a database with 10,000 tables takes about 23ms.
Turso's SQLite rewrite gains an unstable, built-in Change Data Capture feature enabled per connection via PRAGMA unstable_capture_data_changes_conn.
Mastra, a TypeScript AI agent framework, can use Turso's libSQL (a SQLite fork with native vector search) as a single database for agent memory, telemetry and vector embeddings.
Database-per-tenant schema migrations can scale to millions of databases by inverting control: a hosted schema registry stores a versioned catalog of SQL scripts, and each client periodically reports its schema version, pulls the missing migrations and applies them locally.
Turso's Go API proxy, which maps database URLs to physical servers, ran out of memory as customers created millions of databases programmatically.
Turso Cloud makes every SQLite database durable on S3 and S3 Express, treating local server disk purely as a cache.
Litestream is being reworked around ideas from LiteFS. It replaces the raw-WAL "shadow WAL" with transaction-aware LTX files, sorted page changesets that can be compacted LSM-style, so point-in-time restores no longer replay every intermediate page write.
Turso paid-plan users can move database groups from Fly.io to AWS with new `turso group aws-migration info/start/abort` CLI commands; free-tier users have already been migrated.
Turso Cloud moved to a diskless architecture where writes are acknowledged only after landing in S3 Express One Zone, so compute pods hold no durable local state and can be rescheduled freely.
Turso Cloud is now generally available on AWS, built on an S3-native architecture where every commit is made durable on S3 Express One Zone and local disks serve as a read cache.
Testing against SQLite when production runs Postgres gives false confidence.
Turso has released `libsql-laravel`, an official open-source Laravel adapter, along with a PHP PDO interface.
A local retrieval-augmented generation pipeline can be built in TypeScript using Ollama's Mistral model for both embeddings and generation, with libSQL storing documents and 4096-dimension F32_BLOB vectors in a single SQLite file indexed via libsql_vector_idx.
Turso has released a technical preview of libsql_activerecord, an ActiveRecord adapter that connects Rails applications to Turso/libSQL databases.
A commenting system for an Astro blog combines AstroDB (libSQL hosted on Turso) for storage, Astro Actions for validated form submissions, and Server Islands (server:defer) to render the comment list.
Limbo is Turso's from-scratch rewrite of SQLite in Rust that aims for full language and file-format compatibility, memory safety and a modern architecture.
Bolt can generate a Next.js 14 web analytics dashboard backed by a Turso database when you feed it the database schema and a detailed requirements prompt.
A multi-tenant storefront architecture that shares one template codebase but gives each store its own Vercel project, environment variables (name, theme, Stripe key) and Turso database, avoiding shared-database tenant isolation.
Aggregating analytics across a database-per-tenant SQLite architecture works with a simple daily ETL job: discover tenant databases via the Turso Platform API, run a per-database query for daily orders, revenue, active carts and new products, and upsert the results into a central metrics table keyed by date and database name.
libSQL stores embeddings as F32_BLOB columns in ordinary SQLite tables, which lets vector similarity and structured metadata such as date ranges be queried together in plain SQL for RAG pipelines.
Vector search belongs in your primary database rather than a separate system like Pinecone, because syncing embeddings across multiple stores adds cost and operational complexity.
Turso is opening a private beta for Offline Writes, letting applications write to local embedded SQLite replicas while online or offline and sync those changes to the cloud later.
Bun v1.1.31 adds a node:http2 server and gRPC server support via @grpc/grpc-js, with node:http2 benchmarked at 128,879 req/s versus 52,785 req/s on Node v23 (2.4x).
Brick is a Flutter data manager that keeps Supabase data in local SQLite and optional in-memory caches so apps behave the same with or without connectivity.
WriteThatBlog!, an aggregator of engineering blog posts tagged by writing pattern, is a single static HTML page on GitHub Pages that queries a replicated Turso database directly from the browser over HTTP, with no backend functions or proxies.
LibSQL's built-in vector index uses LM-DiskANN, a disk-oriented graph ANN algorithm that stores neighbor graphs in shadow tables.
Kin, a local-first personal AI app, stores its agent memory as a vector-searchable knowledge graph on the user's device using libSQL through the OP-SQLite React Native binding, enabled with a package.json flag.
Kin, a local-first mobile personal AI, stores its personal knowledge graph in libSQL so that relational data, graph edges and vector embeddings live in one embeddable single-file database instead of syncing a separate store like faiss.
Embedding generation can be moved out of the request path by publishing successful libSQL writes to a Kafka topic and computing vectors in a background consumer.
A minimal CRUD REST API in PHP can be built with Dumbo, a small Hono-inspired routing framework, and Turso's experimental HTTP-only PHP SDK for libSQL/SQLite.
An AFTER INSERT trigger on a users table copies each new row into a new_users outbox table.