azurepostgresqldatabasecost-optimization

Azure PostgreSQL Flexible Server cost: tiers, HA, and reservations

Flexible Server bills compute by tier (Burstable ~$12/mo, General Purpose, Memory Optimized) + storage. HA doubles compute. Here's how to pick the tier, when to skip HA, and how reservations and stop/start cut the bill.

The C3X Team··7 min read

Quick answer

Postgres Flexible Server bills compute (vCores × tier rate) + storage (~$0.115/GB) + backup. Three tiers: Burstable (~$12-15/mo, dev/light), General Purpose (steady production), Memory Optimized (RAM-heavy). HA roughly doubles compute. Cut cost by using Burstable for low load, skipping HA where you don't need it, reserving steady compute (up to 65% off), and stopping dev servers off-hours.

Flexible Server is the modern Azure Postgres deployment, and its cost is refreshingly predictable: compute by tier, storage by GB, backup beyond a free allowance. The decisions that move the bill are which compute tier you pick and whether you turn on high availability — both easy to over-provision by default.

The three compute tiers

  • Burstable (B-series): cheapest. B1ms is ~$12-15/month plus storage. Accrues CPU credits when idle, spends them under load — ideal for dev, test, and databases that are busy only occasionally. Throttles under sustained load.
  • General Purpose (D-series): balanced compute for most production databases. A D2s is ~$95/month of compute before storage.
  • Memory Optimized (E-series): more RAM per vCore for memory-bound workloads, at a higher rate.

Storage is ~$0.115/GB-month, billed for provisioned size, plus backup storage beyond the included allowance.

High availability doubles compute

Zone-redundant HA provisions a hot standby in another availability zone, roughly doubling the compute charge. It's the right call for production databases that can't tolerate downtime — and the wrong one for dev, test, or anything where a few minutes of failover unavailability is acceptable. Enabling HA "to be safe" on non-critical databases is a common doubling of the bill.

The big levers

  1. Reserve steady compute. Up to ~65% off for 1-3 years on a database that runs continuously at a known size — see Azure reservations vs savings plans.
  2. Stop dev/test servers off-hours. Stopping halts compute billing (storage continues); auto-restarts after 7 days. A dev database run only on weekdays costs a fraction of a 24/7 one.
  3. Right-size the tier. Burstable for light load, General Purpose for steady — don't pay Memory Optimized rates for a workload that isn't memory-bound.

FAQ

How is Azure Database for PostgreSQL Flexible Server priced?

By compute tier (vCores × hourly rate), plus storage per GB-month (~$0.115/GB), plus backup storage beyond the free allowance. Compute comes in three tiers: Burstable (cheapest, for dev/light load), General Purpose, and Memory Optimized. High availability roughly doubles compute by adding a standby.

What's the cheapest way to run Postgres Flexible Server?

The Burstable tier (e.g. B1ms, ~$12-15/month plus storage) for dev, test, and low-traffic databases. Burstable VMs accumulate CPU credits when idle and spend them under load — ideal when the database isn't busy most of the time. Don't use Burstable for sustained-load production; it throttles when credits run out.

Should I enable high availability?

Only when you need it. Zone-redundant HA adds a hot standby in another zone, which roughly doubles the compute cost. It's right for production databases that can't tolerate downtime, but enabling it on dev/test or non-critical databases doubles the bill for failover you'll never use.

How much can reservations save on Postgres?

Reserved capacity on the compute tier is up to ~65% off for a 1- or 3-year commitment. For a database that runs continuously at a known size, it's the single biggest lever. You can also stop a Flexible Server when it's not needed (dev/test), which pauses compute charges while storage continues.

Can I stop a Flexible Server to save money?

Yes. Flexible Server supports stopping the instance, which halts compute billing (storage still bills). It auto-restarts after 7 days. This makes it practical to stop dev and test databases overnight and on weekends, cutting their compute cost by more than half.

How does C3X estimate Postgres Flexible Server cost?

C3X prices an azurerm_postgresql_flexible_server from its SKU (tier and vCores) and storage, so the compute and storage cost — and the effect of HA — are visible before deployment.

What to do next

The tier, storage, and HA setting are all in your Terraform, so the cost is decidable before deploy. C3X prices an azurerm_postgresql_flexible_server from its SKU and storage, so an oversized tier or unnecessary HA shows up in review. The quickstart runs it in minutes.

Try C3X on your own Terraform

Free and open source. No API key required. One command to install, one command to estimate.