Postgresql flexible server impossible to delete after failed creation

Joshua 0 Reputation points
2025-05-07T09:49:51.8466667+00:00

Hello everyone,

I have an issue on Azure. I created with the CLI a postgresql flexible server, but this creation failed with internal error:

(InternalServerError) An unexpected error occured while processing the request. Tracking ID: '65ba6bec-92b4-4230-b046-681aa0c5e8ff'

Code: InternalServerError

Message: An unexpected error occured while processing the request. Tracking ID: '65ba6bec-92b4-4230-b046-681aa0c5e8ff'

It was due to a nested DNS ressource that I should delete before.

But, this server has been created and he's in a bad state.
When I go in the portal page, I have this error:
this._serverData().systemData is undefined

And impossible to delete this server to re-create it after, I have everytime "Not Found" errors, trying with these commands:

  • az postgres flexible-server delete
  • az resource delete

Nothing works.

Does someone can help me please ?

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Adithya Prasad K 1,135 Reputation points Microsoft External Staff Moderator
    2025-05-07T10:21:00.92+00:00

    Hi Joshua
    I understand you're facing an issue where you're unable to delete a PostgreSQL flexible server after a failed creation attempt. That sounds really frustrating! Here's what I suggest you can try:

    1. Check Resource State: First, ensure that the server is genuinely in a "bad state." Sometimes, the resource might not appear immediately in the portal, and it might help to refresh or check the Azure CLI for the actual status.
    2. Use Azure CLI with Force Flag: You can attempt to delete the server using the Azure CLI with the --yes flag to bypass any confirmation prompts. The command should look like this:
      
         az postgres flexible-server delete --resource-group <resource-group> --name <server-name> --yes
      
      
    3. Try Deleting Resource Group: If you don't mind losing other resources in that group, and the above methods fail, consider deleting the entire resource group:
      
         az group delete --name <resource-group> --yes --no-wait
      
      
    4. Check Dependencies: Ensure there are no dependent resources (like DNS resources) preventing deletion. Disabling or removing those dependencies can sometimes resolve the issue.

    I hope one of these suggestions helps you resolve the issue! If you have any further questions or need more clarification on any steps, feel free to ask!

    0 comments No comments

Your answer

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