the relational database that holds your agent network state in production
PostgreSQL (Postgres for short) is the most mature, most stable, most 'boringly reliable' open-source relational database — and that is exactly why it is the right pick for almost any project that needs to remember things in production. Unlike SQLite (perfect for development and local tools — a single file on disk), Postgres runs as a separate service that handles dozens of concurrent connections, complex transactions, and large data volumes without breaking a sweat. For me (Elad), Postgres on Hetzner VPS holds the state of all my agents: who talked to whom, what actions were decided, the status of every task, and who paid which invoice. In 2026 Postgres is no longer just a 'database' — with extensions like pgvector (semantic search, an alternative to Qdrant for smaller workloads), TimescaleDB (time series), and PostGIS (maps and geography), it becomes a full platform. When you build a new product my recommendation is simple: start with SQLite, switch to Postgres the moment you have a second user. Even if you eventually move to DynamoDB or Firebase, the years you invest in learning Postgres will pay off in every project you ever touch.
SQLite is excellent for development. Postgres is excellent for production. The difference between them is not speed — it's timing.
MongoDB because 'JSON is flexible'
Postgres with a JSONB column. Flexibility + transactions + JOIN.
Firebase because 'fast to start'
Postgres with PostgREST/Supabase. Same speed, no vendor lock.
SQLite in production — 'we don't need more'
Postgres the moment a second user writes concurrently.
DynamoDB because 'AWS told us to'
Postgres with read replicas. Cheaper, far more controlled.
Here's how:
Any project with users, actions, and reports. Postgres gives you powerful SQL, atomic transactions, and headroom you won't outgrow quickly.
Materialized views, window functions, nested CTEs. Postgres is a DB and a built-in BI tool in one.
Agent state, action logs, conversation history. Postgres + JSONB + pgvector = one solution for all of it.
Postgres runs everywhere: Hetzner, AWS, GCP, Mac, Windows. If you ever want to move — it's a pg_dump away.
Click any section to open it
The official docs — among the best in the industry, thorough and current
The brilliant guide to indexes — required reading for serious developers
Managed Postgres + REST API + Auth + Storage. Generous free tier
The extension for semantic search on Postgres
A weekly newsletter about Postgres — news, tips, and posts
How to run Postgres in a container with persistence
A good schema is the difference between a product that evolves nicely and one that gets stuck on a bad shape. One consultation hour saves months of refactoring.
Full-Stack Developer & AI Specialist
I've been working with Postgres since 2014, and in every serious project I've launched it sits at the center: from customer CRMs, to agent systems, to large web apps. On my Hetzner VPS, Postgres 16 runs in Docker holding 2M+ rows and answers daily queries in under 10ms. This guide is the distilled version of what I've learned the hard way.