I resolved this error by purchasing a support subscription and submitting a case with Azure.
PostgreSQL flexible server stuck in "updating" state
I attempted a to scale a PostgreSQL flexible server within the same CPU class and it has been stuck in "updating" status for over an hour.
The server is currently in 'updating' state. Please wait for the operation to complete. You can refresh to check status. Reach out to Microsoft support if the operation is taking too long.
I attempted to restore a new server from backup and that failed. I attempted to spin up a clean replacement and that also failed. Any advice is welcome.
Azure Database for PostgreSQL
2 answers
Sort by: Most helpful
-
-
can kucukgultekin 255 Reputation points2025-11-20T23:55:31.3833333+00:00 Hi C Thompson,
Being stuck in "updating" state for over an hour is really frustrating honestly and this happens with postgresql flexible server sometimes but its not normal. in your case if backup restore and new server create are also failing this is most likely an azure control plane problem not related to your config.
First thing you should do is check azure service health. go to service health blade in azure portal, select your subscription and region, check if theres an active issue for postgresql flexible server. sometimes region-wide control plane issues happen and everyone gets affected, if you see it there at least you know why and you need to wait for azure to fix it.
Second step is looking at activity log. go to your resource group, in activity log find that scale operation, click on details. there you sometimes see more specific error messages like "suboperation failed" or "vm allocation error" that you dont see in portal. this gives you clues about root cause.
if theres no problem in service health and 1+ hour passed honestly fastest solution is opening azure support ticket. from portal go "help + support" > "new support request", select problem type "technical", service "azure database for postgresql flexible server", describe problem as "scaling" or "stuck in updating state". depending on subscription type support level varies but stuck resource is considered critical issue they usually respond fast. when opening ticket include: resource id, exact time when scale started, screenshot of "updating" state, activity log details. this speeds up their troubleshooting.
Alternatively you can try force operation cancel with azure cli but this is risky. if cancel button in portal is disabled try this with cli:
az postgres flexible-server update --resource-group <your-rg> --name <server-name> --no-waitor
az resource update --ids <resource-id> --api-version 2022-12-01 --set properties.state='Ready'but this usually doesnt work because if operation is still going on in backend manually changing state doesnt fix it. also risky because server can go into inconsistent state.
try creating test server in different region. if you can create postgresql flexible server in different region that means problem is related to your current region. in this case either you wait for support ticket for existing server in that region or you plan migration to different region.
Finally if its production critical and you cant wait for support response you can official way is opening ticket.
Check service health for region-wide issue, look at activity log for detailed error, open support ticket (most reliable solution), test in different region, you can try cancel with cli but risky. stuck resources usually need backend intervention so support ticket is necessary.