An Azure managed PostgreSQL database service for app development and deployment.
Hello Alberto Zuin
It sounds like you're having a frustrating time with your PostgreSQL flexible servers being stuck in the deletion process. This can definitely happen due to various reasons. Here are some steps and suggestions to help you troubleshoot the issue:
- Check for Read Replicas: Ensure that there are no read replicas associated with the servers you are trying to delete. Read replicas must be deleted before you can delete the primary server. You can check for any replicas using the Azure CLI:
az postgres flexible-server replica list --resource-group <RESOURCE_GROUP_NAME> --server-name <SERVER_NAME>
If there are replicas present, you can delete them using:
az postgres flexible-server replica delete --resource-group <RESOURCE_GROUP_NAME> --name <REPLICA_NAME> --yes
- Role Assignments: Make sure that your account has the necessary permissions to delete the servers. You can check your role assignments with:
az role assignment list --scope <SCOPE>
- Check for Resource Locks: Sometimes resource locks can prevent deletion. Make sure there are no locks applied to the servers:
az resource lock list --resource-group <RESOURCE_GROUP_NAME>
If you find any locks, you can remove them with:
az resource lock delete --ids <LOCK_ID>
- Retry Deletion Command: After clearing up the dependencies (replicas, roles, and locks), try the deletion command again:
az postgres flexible-server delete --resource-group <RESOURCE_GROUP_NAME> --name <SERVER_NAME> --yes --force
If you follow these steps and the servers are still stuck in deletion, you might be facing a backend issue as you mentioned in your query. Given that you don't have access to create a priority ticket, ensure to share this information with any supporting agents you engage with for further assistance.
Follow-Up Questions:
- Have you checked if there are any read replicas associated with the servers?
- Can you confirm that your account has the necessary permissions for deleting the servers?
- Are there any resource locks applied to the servers you are trying to delete?
- Have you tried a different account to see if the issue persists?
Reference links: https://learn.microsoft.com/azure/postgresql/configure-maintain/how-to-enable-deletion-protection https://learn.microsoft.com/azure/role-based-access-control/overview https://learn.microsoft.com/azure/postgresql/configure-maintain/how-to-delete-server https://learn.microsoft.com/azure/postgresql/flexible-server/
I hope these steps help you get things sorted out! If you need more specific instructions or further assistance, feel free to ask!