Reserving PostgreSQL capacity: the basics
What is Azure Advisor actually telling you to buy?
Azure Advisor raises a cost recommendation, 'Consider Database for PostgreSQL reserved instance to save over the pay-as-you-go costs', when it sees a flexible server running steadily enough that prepaying its compute would cost less than paying by the hour. A reserved capacity purchase is a commitment: you tell Azure you will run a given amount of PostgreSQL compute, in a given region and performance tier, for one or three years, and in return the compute charges that match drop from the pay-as-you-go rate to the reserved rate. Microsoft documents savings of up to 65 per cent on compute against pay-as-you-go for these reservations.
The recommendation is not asking you to change anything about the database. There is no migration, no downtime, no new resource attached to the server. A reservation is a billing instrument. An already-running flexible server, or one you deploy tomorrow, automatically receives the discount as soon as its attributes match an active reservation. You do not assign a reservation to a specific server; Azure applies the benefit to whatever qualifying compute is running in the chosen scope.
The one thing to get right is sizing. A reservation covers compute only, the vCores, not the storage, backup, networking or software charges on the server. It is bought for a specific region, deployment type and performance tier, so the question is not 'should we reserve PostgreSQL?' in the abstract, it is 'how many vCores of this exact shape do we run around the clock, every month, that we are confident will still be running in a year?' Reserve that floor, and leave the variable part on pay-as-you-go.
In this lesson you will learn what the Azure Advisor reserved-capacity recommendation for Azure Database for PostgreSQL is really proposing, how reserved pricing applies to a flexible server without touching the database, how to size a reservation so the discount lands on real steady-state compute, and how to buy and verify one from the portal, the az CLI or Bicep. The aim is a reservation that captures the saving Advisor identified without over-committing.
The discount hiding in the hourly rate
Pay-as-you-go pricing is, in effect, a flexibility premium: the hourly rate bundles in the option to switch a resource off at any moment and stop paying. For a database that never switches off, that option is worthless, yet you pay for it every hour. Reserved capacity simply lets you hand the option back in exchange for a lower rate. It is the same compute, the same server, the same performance; the only thing that changes is the line on the invoice. Azure even applies the benefit automatically to matching servers you have not deployed yet, so a reservation bought today quietly discounts the production server you stand up next month.
Finding the reservable floor across a subscription
Priya runs the platform team at a scale-up whose Azure bill is climbing as the product grows. Advisor has surfaced the 'Consider Database for PostgreSQL reserved instance' recommendation against the production estate, and the instinct is to click buy. Priya wants to size it properly first.
Advisor builds the recommendation by analysing hourly usage over a lookback window, defaulting to 30 days, and recommending the quantity that would have maximised savings. Before committing, Priya lists the flexible servers and their compute shapes, so the steady production servers can be told apart from the dev and test servers that should stay on pay-as-you-go.
List the flexible servers with their tier and vCore count, so you can see which shapes are running steadily and worth reserving.
Two production servers of the same tier in the same region are the reservable floor. The dev server scales down out of hours, so it stays on pay-as-you-go.
How a PostgreSQL reservation actually appliesdeep dive
A reservation is a billing object, not a property of the server. When you buy one you specify a region, a deployment type, a performance tier and a quantity of vCores, plus a term of one or three years and a scope. Azure then matches that reservation, hour by hour, against the qualifying PostgreSQL compute running in scope and applies the reserved rate to whatever matches, up to the reserved quantity. Compute beyond the reserved quantity, or compute that does not match the attributes, continues to bill at the pay-as-you-go rate. The reservation covers compute only: storage, backup, networking and software charges on the server are billed normally regardless.
Because the benefit is matched rather than attached, vCore size flexibility lets you scale up or down within the same performance tier and region without losing it. If you scale a reserved server to a larger size, the reservation still discounts up to the vCores you reserved and the excess bills on demand; if you scale down, the freed reserved capacity flows to other matching servers in scope. The scope itself can be a single subscription, a single resource group, a management group, or shared across all subscriptions in the billing account, which determines how widely the discount roams to find matching compute.
Advisor decides a server is a candidate by analysing hourly usage over a lookback window, 7, 30 or 60 days with 30 as the default, computing what a reservation would have cost against the actual pay-as-you-go spend, and recommending the quantity that would have maximised the saving. Because it is usage-driven, the recommendation only fires once a server has run long enough to establish a steady pattern, which is exactly the signal that the compute is safe to commit. Reservations do not auto-renew unless you opt in, and you receive an expiry notice 30 days out, after which unmatched compute simply returns to the pay-as-you-go rate.
What is the impact of leaving steady compute on pay-as-you-go?
The direct impact is straightforward overspend. Every hour a steady-state production database runs on the pay-as-you-go rate when it could be running on a reserved rate is the discount, up to 65 per cent on the matching compute against pay-as-you-go, left unclaimed. For a server that runs continuously, that gap compounds across thousands of hours a year, and it recurs for as long as the workload exists and the reservation does not.
The second-order impact is that the most predictable spend in the estate, the part most amenable to a clean financial commitment, is the part being managed least deliberately. Pay-as-you-go is the right default for genuinely variable workloads, but using it for a database that never switches off is paying a flexibility premium for flexibility the workload does not need. Leaving the recommendation unactioned is not neutral; it is an ongoing decision to pay more for the same compute.
There is also a forecasting cost. Reserved capacity converts a variable hourly charge into a known commitment, which makes the database line of the cloud budget predictable for the term. An estate that reserves its steady floor can forecast that floor with confidence; an estate that runs everything on demand carries avoidable variance in the most stable part of its bill. The trade is not risk for saving, it is flexibility you are not using for a lower, more predictable rate.
How do you capture the saving safely?
Treat this as a sizing exercise, not a purchase. The order matters: confirm the steady floor before you commit, so you reserve compute you are confident will still be running for the term, and leave the variable layer alone.
1. Separate the steady floor from the variable layer
List your flexible servers by region, deployment type, performance tier and vCore count. The reservable floor is the production compute that runs continuously at a stable shape; the variable layer is the dev, test and burst capacity that scales down or gets torn down. Only the floor should be reserved.
2. Size against real usage, not the headline
Advisor sizes its recommendation on hourly usage over a lookback window. Confirm the proposed quantity against the steady floor you actually identified, rather than accepting a number that may lean on variable servers. Reserve the vCores you are confident will run for the whole term, and leave the rest on pay-as-you-go.
3. Choose term, scope and billing deliberately
Pick one year for a near-certain payback or three years where the workload horizon supports a deeper discount. Choose a scope, single subscription, single resource group, management group or shared, wide enough for the benefit to find your matching servers. Choose upfront or monthly billing to suit cash flow; the discount is the same either way.
4. Buy, verify and set a review date
Price the reservation with the calculate command before purchasing, buy it, then confirm matching servers are receiving the benefit in Cost Management. Reservations do not auto-renew unless you opt in, so note the expiry. If the fleet shifts, use self-service exchange or refund to reshape the commitment rather than letting it drift.
# 1. Preview the price and saving BEFORE committing. Confirm the sku/tier/region
# match the steady servers you identified, and that the quantity is your floor.
billingScope="/subscriptions/00000000-0000-0000-0000-000000000000"
az reservations reservation-order calculate \
--reserved-resource-type PostgreSql \
--sku Standard_D4ds_v5 \
--location uksouth \
--term P1Y \
--billing-plan Upfront \
--applied-scope-type Single \
--applied-scope "$billingScope" \
--billing-scope "$billingScope" \
--quantity 2 \
--display-name pg-prod-uksouth-1yr
# 2. The calculate response returns a reservationOrderId. Purchase against it.
az reservations reservation-order purchase \
--reservation-order-id <reservationOrderId-from-calculate> \
--reserved-resource-type PostgreSql \
--sku Standard_D4ds_v5 \
--location uksouth \
--term P1Y \
--billing-plan Upfront \
--applied-scope-type Single \
--applied-scope "$billingScope" \
--billing-scope "$billingScope" \
--quantity 2 \
--display-name pg-prod-uksouth-1yr Quick quiz
Question 1 of 5Azure Advisor raises 'Consider Database for PostgreSQL reserved instance to save over the pay-as-you-go costs' against a production server. What is it actually proposing?
You scored
0 / 5
Keep learning
Go deeper on how reserved capacity prices Azure Database for PostgreSQL and how Azure sizes and applies the benefit.
- Prepay for compute resources with reserved capacity What a PostgreSQL reservation covers, how vCore size flexibility works, and how to buy one in the portal.
- Azure reservation recommendations How Advisor analyses 7, 30 and 60 day usage to size a reservation and recommend the quantity that maximises savings.
- Self-service exchanges and refunds for Azure reservations How to reshape or unwind a reservation if the fleet changes, the safety net that keeps a commitment reversible.
You can now read the Azure Advisor reserved-capacity recommendation for what it is: an offer to reprice compute you already run, at up to 65 per cent off against pay-as-you-go, with no change to the database. Separate the steady production floor from the variable layer, size the reservation to the floor, preview the price with the calculate command, choose term, scope and billing deliberately, then verify the benefit lands and set a review against expiry.
Back to the library