How to stop a Postgresql stuck in "Starting" state and can't be stopped

Matthew Y 0 Reputation points
2025-12-23T09:50:29.0366667+00:00

Hi,

We currently have a Postgresql DB stuck in 'Starting' and I'm unable to stop it from Azure Portal or Azure CLI.

Whats the way to resolve this issue?

Regards,

Matthew

Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Kalyani Kondavaradala 4,600 Reputation points Microsoft External Staff Moderator
    2025-12-23T12:58:04.1366667+00:00

    Hey Matthew Y,

    It sounds like you're facing quite a hassle with your PostgreSQL database being stuck in the "Starting" state. Here are some steps you can take to try and resolve this issue:

    1. Check Current Status: Start by checking the status of your PostgreSQL server via the Azure Portal. Sometimes it might just be a temporary glitch.
    2. Force Stop through Azure CLI: If you're unable to stop it from the Azure Portal, you can attempt to forcefully stop it using the Azure CLI. Here's the command:
      az postgres server stop --name <YourServerName> --resource-group <YourResourceGroupName>
         
            Make sure to replace `<YourServerName>` and `<YourResourceGroupName>` with your actual server and resource group names.
            
      
    3. Restart the Instance: If stopping isn't working, you might want to restart the entire PostgreSQL server. Again, you can do this via Azure CLI:
         az postgres server restart --name <YourServerName> --resource-group <YourResourceGroupName>
      
    4. Check Logs: After trying to stop or restart the server, check the server logs in the Azure Portal under the "Logs" section. This could give you more insight into why the server is stuck.

    I hope this helps to get your PostgreSQL DB back on track! If you have any more questions or need further assistance, feel free to ask.

    References:

    Thanks!

    Kalyani


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.