# Non-Production PostgreSQL Flexible Servers Running Outside Working Hours

Canonical: https://www.pointfive.co/efficiency-hub/inefficiencies/non-production-postgresql-flexible-servers-running-outside-working-hours

Development, test, QA and demo servers on Azure Database for PostgreSQL flexible server are usually needed only during working hours, yet many run 24x7...

By: PointFive

Updated: 2026-09-28

[Cloud Efficiency Hub](https://www.pointfive.co/efficiency-hub) 

The short version

Development, test, QA and demo servers on Azure Database for PostgreSQL flexible server are usually needed only during working hours, yet many run 24x7 with no stop schedule.

PointFive Research

Cloud cost research at PointFive

Azure service

[Azure Database for PostgreSQL - Flexible Server](https://www.pointfive.co/efficiency-hub/cloud-services/azure-database-for-postgresql---flexible-server)

Category

[Databases](https://www.pointfive.co/efficiency-hub/service-category/databases)

Reference

CER-0444

Type

Inefficient Configuration

## Explanation

Why the waste happens and who it affects.

Compute is billed for every hour the server exists in a running state, so a server that is used 40 to 50 hours a week pays for the remaining nights and weekends at the full vCore rate.

Flexible server supports stopping compute on demand, and Microsoft positions stop/start as a cost control for development, testing and time-bound workloads. Stopping once is not enough: a stopped server starts again automatically after seven days, so the savings only persist with a recurring schedule. The waste is spread across many small non-production servers, so it rarely shows up as a single large line item.

## Billing model

The pricing dimensions that drive this cost.

Flexible server bills compute, provisioned storage and backup storage as separate line items.

Compute

Billed per vCore-hour while the server is running, with each started hour billed in full; billing stops immediately when the server is stopped

Provisioned storage

Billed per GiB-month whether the server is running or stopped

Backup storage

Free up to 100 percent of provisioned storage, then billed per GiB-month; retained backups continue to be billed while the server is stopped

Automatic restart

A stopped server starts automatically after seven days unless it is started sooner, and compute billing resumes

High availability standby

A zone-redundant HA server is billed for the compute and storage of both the primary and the standby

## How to detect

5 checks to find it in your estate.

- List flexible servers tagged or named as dev, test, QA, staging or sandbox and check the server state; servers that are always Ready indicate no stop schedule

- Chart the Active Connections (active\_connections) and CPU percent (cpu\_percent) metrics over several weeks and look for nights and weekends with no application connections or only baseline CPU

- On each non-production server, open Automation \> Tasks and check whether Stop PostgreSQL flexible server and Start PostgreSQL flexible server tasks exist and are enabled

- Review the Activity Log for stop and start operations; a server that was stopped once and restarted seven days later without a new stop indicates the schedule is missing

- Note which non-production servers have zone-redundant high availability enabled; each running hour is billed for both primary and standby compute, so they gain the most from a stop schedule

## How to fix

5 ways to remove the waste.

- Create paired automation tasks on each server from the Stop PostgreSQL flexible server and Start PostgreSQL flexible server templates, or use Azure Automation or Logic Apps to stop servers outside working hours; automation tasks run on Logic Apps Consumption pricing, billed per trigger and action execution

- Make the stop schedule recur at least every few days (for example nightly and at the start of the weekend) so the seven-day automatic restart does not leave servers running

- When stopping a primary with read replicas, stop the primary before the replicas and start the replicas before the primary, as Microsoft documents for power operations

- Avoid stopping and starting within the same hour, since each hour a server runs is billed in full

- For small servers that must stay reachable, consider the Burstable tier instead of stopping, noting that Burstable does not support read replicas, the built-in PgBouncer or on-demand backups

## Documentation

Vendor references for pricing and configuration.

- [What Is Azure Database for PostgreSQL flexible server?  learn.microsoft.com](https://learn.microsoft.com/en-us/azure/postgresql/overview)

- [Stop compute of a server in Azure Database for PostgreSQL Flexible Server  learn.microsoft.com](https://learn.microsoft.com/en-us/azure/postgresql/configure-maintain/how-to-stop-server)

- [Manage Azure Database for PostgreSQL flexible server using automation tasks  learn.microsoft.com](https://learn.microsoft.com/en-us/azure/postgresql/integration/create-automation-tasks)

- [Backup and Restore in Azure Database for PostgreSQL Flexible Server  learn.microsoft.com](https://learn.microsoft.com/en-us/azure/postgresql/backup-restore/concepts-backup-restore)

- [Architecture Best Practices for Azure Database for PostgreSQL  learn.microsoft.com](https://learn.microsoft.com/en-us/azure/well-architected/service-guides/postgresql)

- [Pricing - Azure Database for PostgreSQL Flexible Server  azure.microsoft.com](https://azure.microsoft.com/en-us/pricing/details/postgresql/flexible-server/)

## Related inefficiencies

[Browse the library](https://www.pointfive.co/efficiency-hub)

- Azure Database for PostgreSQL - Flexible Server  CER-0443

### [High Availability Enabled on Non-Production PostgreSQL Flexible Servers](https://www.pointfive.co/efficiency-hub/inefficiencies/high-availability-enabled-on-non-production-postgresql-flexible-servers)

High availability on Azure Database for PostgreSQL flexible server provisions a standby replica, in another availability zone (zone-redundant) or the same zone (same-zone), with the same vCores, storage and network configuration as the...

Databases

- Azure Database for PostgreSQL - Flexible Server  CER-0148

### [Overprovisioned Azure Database for PostgreSQL Flexible Server](https://www.pointfive.co/efficiency-hub/inefficiencies/overprovisioned-azure-database-for-postgresql-flexible-server)

Azure Database for PostgreSQL - Flexible Server often defaults to general-purpose D-series VMs, which may be oversized for many production or development workloads. Many PostgreSQL workloads do not need high sustained CPU and can run on...

Databases

- Azure Database for PostgreSQL - Flexible Server  CER-0445

### [Missing Reserved Capacity for Steady-State PostgreSQL Flexible Servers](https://www.pointfive.co/efficiency-hub/inefficiencies/missing-reserved-capacity-for-steady-state-postgresql-flexible-servers)

Production Azure Database for PostgreSQL flexible servers typically run around the clock for years, yet many estates pay the pay-as-you-go vCore rate for all of them. Reservations and savings plans are often bought for virtual machines...

Databases

---
Source: the public page above. Product screenshots and illustrative interfaces are examples, not live customer data.

