Share via

I am being charged approximately $4 per day, even though I haven’t been using the database for the past couple of days.

Anson Mathew 0 Reputation points
2026-03-19T15:39:13.87+00:00

I created an Azure Database for PostgreSQL (Flexible Server) a couple of days ago and set up the tables. However, I haven’t been accessing it since then, but I am still being charged approximately $4 per day.

I only need this database for minimal usage. Will I continue to be charged around $4 per day just for keeping the server running, even without any transactions?

Is there any way to reduce these charges? Will I be charged for the deployed JAR file even if I am not currently using it?

Community Center | Not monitored
0 comments No comments

3 answers

Sort by: Most helpful
  1. Suchitra Suregaunkar 12,330 Reputation points Microsoft External Staff Moderator
    2026-03-20T00:18:29.52+00:00

    Hello Anson Mathew it looks like the ~$4/day you’re seeing is simply the cost of keeping a provisioned Flexible Server up and running—even if you haven’t hit it with any queries. Azure Database for PostgreSQL Flexible Server bills you by the hour for the vCores and RAM you reserve plus the storage (and backups) you’ve allocated, regardless of load. Here’s what’s going on and how you can shrink that daily bill:

    You’ve provisioned compute (vCores + memory)

    • Flexible Server currently only supports provisioned compute tiers, so you pay for the compute capacity 24 × 7, even when idle.
      • The smallest configuration (1 vCore, smallest memory) in your region is what yields that ~$4/day number.
      You’re also paying for storage (+ backup retention)
      - Storage is billed per GB‐hour and your backup retention (automated daily backups) adds to that.
      
      Deploying a JAR or other files doesn’t incur a separate “app” charge
      
         - Any code or artifacts you upload simply use storage and I/O. There’s no standalone “jar‐service” fee.
      

    How to cut your costs

    • Scale down your server tier • Drop to the smallest vCore count and minimal storage you actually need.
    • Turn the server off when you don’t need it • In the portal you can Stop the Flexible Server—this deallocates compute so you only pay for storage (you’ll still pay storage & backups but you’ll save the compute portion).
    • Consider the serverless tier (preview) or single-server options with auto-pause • Serverless tiers only bill you for actual compute usage and storage; if you go idle long enough it auto-pauses.
    • Delete the server when you’re really not using it • If this is strictly for experimentation, tear it down and recreate when needed.

    Follow-up questions to nail down your optimum savings

    1. Which region, compute tier (vCores + RAM), and storage size did you provision?
    2. What’s your configured backup retention period?
    3. Do you need the server running 24×7, or could you stop it evenings/weekends?
    4. Would a serverless compute tier (pay-per-usage + auto-pause) fit your minimal-usage scenario?

    Reference docs

    Hope this helps you understand the cost drivers and some levers to lower that $4/day! Let me know if you need any more details. 

    0 comments No comments

  2. TP 155.6K Reputation points Volunteer Moderator
    2026-03-19T16:06:18.7166667+00:00

    Hi,

    To save on costs you can Stop your Azure Database for PostgreSQL Flexible server when not in use. When it is stopped you are only charged for provisioned storage and backup storage used.

    Please note it will automatically start after 7 days of being stopped, so if you need to have it stopped for extended periods you will need to stop it periodically. Please see article below for more details:

    Stop compute of a server

    https://learn.microsoft.com/en-us/azure/postgresql/configure-maintain/how-to-stop-server

    You are charged for compute whenever your Azure Database for PostgreSQL Flexible server is running, regardless of whether or not you use it. That is why you are seeing the $4 per day cost even though there hasn't been any transactions.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    0 comments No comments

  3. Q&A Assist
    2026-03-19T15:39:31.4233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Azure Database for PostgreSQL – Flexible Server incurs charges for the provisioned compute and storage as long as the server is running, regardless of whether there are active connections or transactions. So yes, charges continue even if the database is not being accessed.

    To reduce or avoid charges:

    1. Scale down compute and storage
      • Use a smaller SKU (for example, a Burstable SKU) and minimal storage to lower daily cost.
      • Scaling compute up/down is supported via Azure portal, CLI, or REST API and requires a server restart.
      • For non‑production or low‑usage environments, configure cost‑efficient SKUs and keep resources conservative.
    2. Start/stop the server to save compute cost
      • For Azure Database for PostgreSQL – Flexible Server, compute charges stop when the server is stopped; storage charges continue.
      • Start the server only when needed and stop it when not in use. This can be done via Azure portal, Azure CLI, or REST API.
      • If a server remains stopped/idle for several weeks and is no longer needed, consider dropping (deleting) it after taking any required backups.
    3. Use Azure free account benefits (if applicable)
      • An Azure free account includes free monthly limits for PostgreSQL Flexible Server (for example, a certain number of Burstable compute hours and GB of storage).
      • Usage beyond those free limits or beyond the initial credit is billed normally.
      • Use the Azure portal → Subscriptions → Free Trial → Top free services by usageView all free services to track whether PostgreSQL usage is within free limits.
    4. Clean up unused resources
      • If the database is no longer needed, delete the PostgreSQL flexible server or its resource group to stop both compute and storage charges for that server.
      • If it is needed only occasionally, combine stopping the server with periodic exports (for example, using pg_dump to Blob Storage) so that the server can be deleted and recreated when required.

    Regarding the deployed JAR file:
    A JAR file itself does not incur separate database charges. Costs come from the running PostgreSQL server (compute, storage, and any configured backup vault usage). The JAR might incur charges only through whatever compute or other Azure services it runs on (for example, an app service or VM), but not as a PostgreSQL database line item.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.