Managed PostgreSQL pricing: Azure vs AWS vs Google vs Oracle
A managed PostgreSQL service runs the database server for you: it patches it, backs it up and replaces it if it fails. You pay for the server by the hour and for the disk by the gigabyte. The four clouds sell the same idea under different names, and the differences are in the details of those two charges.
The services
| Cloud | Service we compare |
|---|---|
| Azure | Azure Database for PostgreSQL Flexible Server (General Purpose) |
| AWS | Amazon RDS for PostgreSQL (M6i, gp3 storage) |
| Google Cloud | Cloud SQL for PostgreSQL (Enterprise) |
| Oracle Cloud | OCI Database with PostgreSQL |
We compare general-purpose sizes in a single zone, at 2 vCPU with 8 GB of memory and at 4 vCPU with 16 GB. We leave out memory-optimised and burstable tiers, because a burstable server and a fixed-performance one are not the same product and should not be set side by side.
The two main charges
Compute, by the hour. The server is billed for every hour it exists, busy or idle. A server that runs all month is 730 hours.
Storage, by the gigabyte a month. You pay for the disk you provision, not only the data in it. Disks are easier to grow than to shrink, so over-provisioning costs money every month.
Some services add further charges, for example for extra disk performance or for backup storage beyond what is included. Those depend on settings and usage, so check the vendor’s price page for your case. The compare page for managed PostgreSQL lists every price line we use, with its unit and a link to the vendor’s page.
High availability
High availability keeps a standby server in a second zone, ready to take over if the first fails. It is billed as a second copy of the compute. On clouds where each server has its own disks, the storage is billed twice as well. Oracle’s two nodes share storage, so it is counted once.
For a small database, high availability is often the single biggest change you can make to the bill, since it roughly doubles the compute line. Whether it is worth it depends on how much downtime you can accept, not on price alone.
What our estimates leave out
The web app estimator prices one server or, with high availability, a primary and a standby, plus storage. It does not include backups beyond what each service includes, read replicas, extra disk performance, monitoring, or discounts for one or three year commitments. Those can change a real bill noticeably, so use the estimate to compare clouds on equal terms.
Choosing a size
Start with the smaller size and watch memory and CPU use once real traffic arrives. Moving up a size is usually a short restart, while an oversized server costs the full hourly rate every hour. If you are unsure how much storage to provision, estimate your data growth for the next few months and add margin, rather than for several years.
For how the database fits into the whole bill, see what a web app costs.