Blog
postgresql for everythingpostgres architecturemanaged database costs

PostgreSQL for Everything: Escaping the Expensive Managed Database Trap

How companies cut database bills by replacing Redis, Elasticsearch, Kafka, and MongoDB with one Postgres instance. The architecture and the real math.

Portrait of Luis Chavez-Mattos
Edited by Luis Chavez-Mattos, Director, Product··RSS

For Executives, IT and Operations

A towering stack of five database cylinders is shown collapsing into a single, solid database cylinder.

Why are companies running everything on PostgreSQL instead of paying for managed databases?

"PostgreSQL for everything" means running your cache, job queue, full-text search, document store, and vector search on a single Postgres instance instead of renting five separate managed databases. Companies do it to cut SaaS and cloud database bills, reduce the number of systems that can fail, and stop paying markup on commodity infrastructure. Postgres extensions like pgvector, pg_search, and pgmq now cover most of the ground that used to require Redis, Elasticsearch, MongoDB, and Kafka.

TL;DR

  • Postgres extensions like pgvector, pg_search, and pgmq now cover most of what used to require Redis, Elasticsearch, MongoDB, and Kafka.
  • Three separate systems each rated at 99.9% uptime give a combined SLA of roughly 99.7%, so more systems means more places to break.
  • The claim is not that Postgres is faster at any one job, but that it is fast enough for the vast majority of applications while saving real operational effort.
  • Managed databases carry a steep markup over raw compute and storage, and it compounds with every additional managed service you add.
  • Each extra database also adds a sprawl tax of monitoring, backup policies, credentials, and vendor renewals.
  • The honest failure mode is piling caching, queueing, and search onto one primary instance without capacity planning, so start on Postgres and peel off a dedicated system only when you have a measured bottleneck.

Why did the stack get fragmented in the first place?

A typical startup stack grows one decision at a time. You need a cache, so you add Redis. You need full-text search, so you add Elasticsearch. You need a job queue, so you add Kafka or RabbitMQ. You need flexible documents, so you add MongoDB. Each choice is defensible in isolation. Together they create what one Postgres consultant calls "dotted line complexity": every pair of systems that shares data adds its own failure mode, monitoring surface, and backup strategy.

The math on reliability alone is bad. If you run three separate systems each rated at 99.9% uptime, your combined SLA is roughly 99.7%, not 99.9%. More systems does not mean more resilience. It means more places for things to break.

What actually gets replaced?

The "Postgres for everything" pattern, popularized by CTO coach Stephan Schmidt and picked up widely across engineering blogs, maps specialized tools onto native Postgres features and extensions:

  • Cache (replacing Redis): UNLOGGED tables or JSONB columns with expiry logic, often faster to reason about than a second in-memory system.
  • Job queue (replacing Kafka/RabbitMQ): SELECT ... FOR UPDATE SKIP LOCKED gives you a working queue with no extra broker.
  • Full-text search (replacing Elasticsearch): built-in text search, extended with pg_search for BM25-style ranking.
  • Document store (replacing MongoDB): JSONB columns with GIN indexes.
  • Vector search (replacing Pinecone/dedicated vector DBs): the pgvector extension.
  • Distributed locks, rate limiting, session storage, cron jobs: advisory locks, atomic updates, and pg_cron.

The underlying claim is not that Postgres is faster at any one of these jobs. It usually is not. The claim is that Postgres is fast enough, and the productivity and operational savings from running one system outweigh the performance gap for the vast majority of applications, an argument made explicitly using Instagram's own history of scaling on plain Postgres.

Where do the actual dollars go?

This is a cost story as much as an architecture story. Two separate cost structures are stacked on top of each other in a fragmented database stack, and both are worth breaking down.

First, the managed-database markup. A detailed teardown of cloud RDS pricing found that Alibaba Cloud's managed Postgres carries a 7x to 11x markup over raw compute, AWS RDS runs 14x to 22x, and cloud block storage can run 6x to 24x the cost of self-purchased storage at the same spec, depending on commitment term. The same analysis found a self-hosted 8-core instance costing roughly ¥432/month in raw compute versus ¥1,582/month for the equivalent AWS RDS HA instance, and 1TB of self-purchased storage at ¥16/month versus roughly ¥1,900 to ¥3,200/month on AWS or Alibaba Cloud. None of that markup is unique to Postgres. It's the standard tax on any managed relational database, and it compounds every time you add another managed service (a managed Redis, a managed Elasticsearch cluster, a managed vector DB) on top of it.

Second, the sprawl tax. Each additional managed database is not just an added line item, it's an added team's worth of learning curve, monitoring dashboard, backup policy, and on-call runbook. A managed Redis Cloud cache alone can run in the hundreds of euros per month even at modest scale, according to one practitioner comparison of MongoDB Atlas and Redis pricing. A managed vector search product or Elasticsearch cluster adds another recurring bill on top of that. Collapse five specialized services into one Postgres instance and you are not just avoiding five markups, you are avoiding five separate monitoring stacks, five sets of credentials, and five vendors whose renewal cycles rarely line up with your budget calendar.

Rough monthly cost comparison, small-to-mid scale workload

SystemFragmented stack (managed)Postgres for everything
Primary database$200-600 (managed Postgres)included
Cache$60-600 (managed Redis)included, UNLOGGED tables
Search$95-300+ (Elastic Cloud tiers)included, pg_search
Queue/broker$100-400 (managed Kafka/RabbitMQ)included, SKIP LOCKED
Vector store$70-300+ (dedicated vector DB)included, pgvector
Total$525-2,200+/month$200-600/month

Figures are directional, based on published entry and mid-tier pricing for each category rather than a single vendor quote; actual bills vary heavily by data volume and traffic.

Where does the counterargument hold?

This is not a call to never use a specialized database. Postgres advocates themselves are careful to frame it as anti-overengineering, not anti-tooling: don't reach for Kafka on day one when you have 200 users, because the operational cost of a second system arrives immediately while the performance need may never arrive at all. The honest failure mode is the opposite one: bolting caching, queueing, and search onto a single primary Postgres instance without capacity planning, so they all compete for the same connection pool, memory, and I/O, and everything gets slower together during a traffic spike.

The practical rule that shows up across the practitioner writing on this topic: start on Postgres for everything, and only peel off a dedicated system once you have a measured, specific bottleneck, not a hypothetical one. Consolidation isn't the end state forever. It's the default you should have to argue your way out of.

Why does this matter beyond engineering?

The broader pattern here is not really about Postgres. It is about companies re-examining what they are actually paying for when they rent infrastructure by the seat or by the service. The same math that makes five managed databases expensive shows up across the SaaS stack: every specialized tool is a recurring bill, a renewal date, and a vendor relationship, even when a general-purpose tool you already run could do the job. For teams thinking hard about which of their rented systems are worth owning outright, platforms like Remy apply the same logic to internal software generally, treating what you build and run yourself as an asset rather than a subscription.

Figure 1
Fragmented managed stack vs. Postgres-for-everything, monthly cost range
Monthly cost (USD)
$525Fragmented stack (low end)$2,200Fragmented stack (high end)$200Postgres for everything (low end)$600Postgres for everything (high end)
Stack configuration
Directional ranges based on published entry and mid-tier pricing across managed Postgres, Redis, Elastic Cloud, managed queues, and vector DB services. Actual bills vary by data volume and traffic.
Illustrative figure. Constructed for explanation, not a measured source.

How we source, write, and correct our articles. Editorial standards

Related articles

Straight to your inbox.
New pieces as they publish. No noise.