Creating Azure PostgreSQL server throws Server name must be available.

Shmiel 0 Reputation points
2026-10-29T14:11:42.0466667+00:00

I'm trying to create a PostgreSQL server on my subscription and it doesn't allow me because Server name must be available. The server name is unique and I even tried with garbage values. My subscription is registered for Microsoft.DBforPostgreSQL. The request for https://management.azure.com/api/invoke gets a 502 response with this error

{
    "error": {
        "code": "InvalidGatewayHost",
        "message": "Host name resolution failed for 'Microsoft.DBforPostgreSQL'; cannot fulfill the request."
    }
}

Azure Database for PostgreSQL
0 comments No comments

3 answers

Sort by: Oldest
  1. Hemant Bharadwaj 340 Reputation points Microsoft Employee
    2026-10-29T14:53:51.7333333+00:00

    Likely cause (confirmed from your error payload): this looks like a control-plane/provider routing problem (InvalidGatewayHost for Microsoft.DBforPostgreSQL), not a normal server-name collision.

     

    Server name must be available is often shown for true name conflicts, but your management.azure.com/api/invoke 502 + Host name resolution failed for 'Microsoft.DBforPostgreSQL' indicates the request path to the PostgreSQL resource provider failed before normal validation completed.

     

    1. Verify provider registration state again (subscription scope)

     

    1. Validate name independently of portal UX

     

    1. Test another supported region
      • Try deployment in a second region to separate a regional control-plane issue from a subscription-wide issue.
      • If one region works and one fails with the same 502/provider-host message, keep both correlation IDs for support.

     

    1. Capture diagnostics and open support request

     

    Validation checks:

    • Expected successful path: create request reaches provider and returns either success or a standard name-availability response (not InvalidGatewayHost).
    • If InvalidGatewayHost persists across multiple names/regions after provider registration is confirmed, this is likely a backend routing issue requiring Microsoft intervention.

     

    Potential causes vs confirmed facts:

    • Confirmed: your current failure includes provider host-resolution error (InvalidGatewayHost).
    • Possible (not confirmed): temporary regional/control-plane incident, stale RP registration state, or subscription routing inconsistency.

     

    “If you find this answer helpful, please upvote it. If this resolves your issue, please mark it as the accepted answer so that it can help others in the community.”

    Was this answer helpful?


  2. TP 165.1K Reputation points Volunteer Moderator
    2026-10-31T23:27:03.8666667+00:00

    Hi,

    Please describe precisely how you are attempting to create PostreSQL Flexible server. For example, are you using wizard in Azure portal or using Azure CLI/PowerShell or REST API or Terraform or Bicep, etc.?

    If you can post code or commands you are using (if using programmatic technique) or details of how you are attempting via portal, region(s) attempted I will try to reproduce the issue.

    Thanks.

    -TP

    Was this answer helpful?

    0 comments No comments

  3. Shmiel 0 Reputation points
    2026-11-02T12:02:01.09+00:00

    Well, it somehow started working today. I don't know what the issue was and why it didn't work until now. But now it's working.

    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.