Share via

PostgreSQL Flexible Server stuck in "Dropping" state — DELETE returns 404, blocks resource group deletion

Paul Li 0 Reputation points
2026-05-12T05:08:27.0733333+00:00

HI ALL,

I encountered this issue for a while now, just wondering if anyone could give me some pointers please?

Problem

A PostgreSQL Flexible Server is stuck in state: "Dropping" and cannot be removed via any public API. Because ARM still lists the resource inside its resource group, the containing resource group cannot be deleted either.

The resource has no replicas, no private endpoints, no VNet integration, no locks, and no in-flight deployments. It is the only resource in the resource group.

Symptoms

  • az postgres flexible-server show returns the resource with state: "Dropping" and provisioningState: null.
  • az postgres flexible-server delete (and equivalent REST DELETE) returns ResourceNotFound (HTTP 404).
  • az resource list -g <rg> lists the server with Status: Succeeded.
  • az group delete fails with ResourceGroupDeletionBlocked, nesting the same ResourceNotFound error on the flexible server.
  • az postgres flexible-server replica list against the same server returns ReadReplicaSourceServerNotFound, contradicting the show result — the asymmetric behaviour characteristic of a stuck Dropping state.

Resource details

  • Resource type: Microsoft.DBforPostgreSQL/flexibleServers
  • Region: newzealandnorth
  • Origin: a previous Bicep/IaC provisioning pipeline was interrupted mid-deploy; the server has been in Dropping state since.

State output

{
  "delegatedSubnet": null,
  "ha": null,
  "privateDns": null,
  "provisioningState": null,
  "publicAccess": "Disabled",
  "replicaRole": null,
  "state": "Dropping"
}

What I have already tried

Step Command Result
1 az postgres flexible-server delete -g <rg> -n <pg> ResourceNotFound (404)
2 az resource delete --ids <id> ResourceNotFound (404)
3 az rest --method delete ...?api-version=2024-11-01-preview ResourceNotFound (404)
4 az rest --method delete ...?api-version=2024-08-01 ResourceNotFound (404)
5 az rest --method delete ...?api-version=2022-12-01 ResourceNotFound (404)
6 az rest --method delete ...?api-version=2021-06-01-preview ResourceNotFound (404)
7 az provider unregister --namespace Microsoft.DBforPostgreSQL InvalidUnregistration — blocked by the stuck resource
8 az provider register --namespace Microsoft.DBforPostgreSQL --wait Succeeded, but state still Dropping afterwards
9 az group delete -n <rg> --yes ResourceGroupDeletionBlocked
10 az lock list -g <rg> No locks
11 az deployment group list -g <rg> No running/accepted deployments
12 az network private-endpoint list -g <rg> No private endpoints
13 az postgres flexible-server replica list ReadReplicaSourceServerNotFound

Question

Is there any public API path (newer/older API version, forceDeletion flag, alternate endpoint, region-level async-operation cancel) that can force-complete the Dropping transition, or is backend intervention from Microsoft support the only remediation for this state?

Secondary: is there a known root cause for PostgreSQL Flexible Server entering an unrecoverable Dropping state, so I can prevent the same orphan on the next provisioning run?

Environment

  • Azure CLI: azure-cli 2.84.0 *
  • Region: newzealandnorth
Azure Database for PostgreSQL

3 answers

Sort by: Most helpful
  1. Paul Li 0 Reputation points
    2026-05-13T03:20:33.5066667+00:00

    HI Saraswathi,

    Thanks for the prompt response and the help.

    I did some further digging and found the cause of this problem, please do pass this to the product/vendor team. And hope this could help more people.

    In our particular case, we enabled a few extensions on the PG server. These will have to be removed during the drop process before the server is dropped. I have tested with script to do exactly that before calling the delete command to successfully drop the server. If we do delete resource group manually on azure portal or simply just calling the delete command on the pg server, it will get stuck at the dropping state.

    Therefore, our current solution is that we will have to use a script to surgically delete and remove all the settings before we call the delete command.

    Hope this makes sense

    Was this answer helpful?

    0 comments No comments

  2. Saraswathi Devadula 16,025 Reputation points Microsoft External Staff Moderator
    2026-05-12T16:01:34.4366667+00:00

    Hello **Paul Li
    Following up on the discussion, the Azure Database for PostgreSQL Flexible Server in the Azure portal is currently stuck in the dropping state.

    As mentioned, we attempted to drop the server from the backend.

    I hope this has been helpful!

    Your feedback is important so please take a moment to accept answers. If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    If this answers your query, do click Accept Answer and Upvote for was this answer helpful.

    Was this answer helpful?

    0 comments No comments

  3. AI answer

    2026-05-12T05:08:45.4866667+00:00

    There is no documented public API, CLI flag, or alternate endpoint in the provided material that can force-complete or cancel a stuck Dropping transition for an Azure Database for PostgreSQL flexible server.

    The available Azure CLI commands for PostgreSQL flexible server resources only support normal delete operations:

    • az postgres flexible-server delete deletes the flexible server when the platform considers it deletable.
    • az postgres flexible-server db delete deletes individual databases on a flexible server.
    • az postgres flexible-server private-endpoint-connection delete deletes private endpoint connections.
    • az postgres flexible-server virtual-endpoint delete deletes virtual endpoints.
    • Resource locks can be applied or removed with az lock create / az lock delete, but in this scenario there are no locks and locks only prevent deletion; they do not resolve stuck Dropping states.

    None of these commands expose a forceDelete or similar override, and the context does not document any region-level or async-operation cancellation API for PostgreSQL flexible servers.

    The behavior described (resource stuck in an intermediate state, public delete returning ResourceNotFound, but the resource still blocking higher-level operations like resource group deletion) matches other Azure resource issues where the only resolution was backend intervention by Microsoft support. For example, a Redis Cache instance stuck in Creating could not be deleted until the platform moved it to a failed state, after which a normal delete succeeded.

    Based on the available information, backend intervention from Microsoft support is the only documented remediation path for a flexible server stuck indefinitely in Dropping that blocks resource group deletion. The context does not provide a documented root cause or prevention guidance for PostgreSQL flexible servers entering an unrecoverable Dropping state.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.