Managed Postgres vs Self-Hosted: The Real Cost Math
What does managed Postgres actually cost versus running it yourself? Here is the dollar math for RDS, Neon, and a self-hosted Postgres on a VPS.
For a small or mid-size product, self-hosted Postgres costs a fraction of managed, and the gap widens as your data grows. A managed Postgres instance with useful specs runs fifty to several hundred dollars a month before you count storage, backups, and egress. The same workload on a VPS you already run is close to free at the margin. Managed Postgres is worth paying for at real scale or when you truly cannot own the operational burden. Below that line, the math favors running it yourself, and most products live below that line.
What does managed Postgres actually cost?
The sticker price hides the real bill. A managed provider quotes you an instance size, then adds storage per gigabyte, backup storage, IOPS or compute units, and data transfer out. A modest production database that looks like fifty dollars a month on the pricing page lands closer to a hundred and fifty once you add provisioned storage, a read replica, and backup retention. Serverless Postgres pricing is worse to predict because it scales with usage, so a traffic spike or a runaway query turns into a surprise on your invoice.
Then there is egress. Moving data out of a managed cloud costs money per gigabyte, and that fee is a lever the provider holds over you. It makes leaving expensive by design, which is the point. I broke this down separately in cloud egress fees are a lock-in tax. The headline instance price is the smallest part of what managed Postgres really costs over a year.
What does self-hosted Postgres cost?
The marginal cost of Postgres on a VPS you already run is nearly zero. It is a container or a package on the box, using RAM and disk you are already paying for. If you dedicate a box to it, a VPS with enough memory and SSD for a serious database runs a fraction of the managed equivalent, with no per-gigabyte storage tax and no egress fee to read your own data.
The honest accounting has to include your time. Self-hosting Postgres means you own backups, updates, and recovery. But that burden is smaller than the managed pitch implies. Backups are a nightly pg_dump or continuous archiving to object storage. Point-in-time recovery is a solved, documented setup, which I walk through in Postgres point-in-time recovery on your own server. Once configured, it runs on its own. Call it an afternoon of setup and an hour a quarter of attention. Against a hundred-plus dollars a month saved, that is a strong hourly rate.
When is managed Postgres worth it?
Managed earns its price in specific cases. If you need automatic failover with near-zero downtime, multi-region replicas, and you have revenue that makes a database outage genuinely expensive, pay for managed and buy the peace of mind. If your team has no one who wants to own a database, managed removes a real risk. And if your data is small and your traffic is spiky, serverless Postgres can be cheaper than a box sitting mostly idle.
The decision is not ideology, it is your durability needs against your operational appetite, which is exactly the frame in own your database or use managed. What I push back on is defaulting to managed out of habit. Most products do not need multi-region failover. They need a reliable database with good backups, and that is cheap to run yourself.
Run the two-year number, not the monthly one
The mistake is comparing the monthly numbers and shrugging at the difference. Run it over two years. Managed at a hundred and fifty a month is thirty-six hundred dollars, climbing as your data grows and your egress rises. Self-hosted is the VPS cost plus a few hours of your time, roughly flat. For a bootstrapped product that difference is a meaningful chunk of runway.
There is a crossover point where scale and reliability needs flip the answer toward managed, and I mapped where that sits in the revenue crossover for self-hosting. Below it, running Postgres on HostSSH keeps the money in your business and the data under your control. Do the two-year math before you accept the managed default. The number is usually not close, and it is usually not in managed's favor for the product you actually have.