Share via

PG 18.2 Flexible Server azure_ai extension

HAKANGOKCOL 0 Reputation points
2026-04-15T10:39:24.2166667+00:00

azure_ai extension listed in azure.extensions dropdown for PG 18.2 Flexible Server (Sweden Central, Burstable B1ms) but Save fails with InternalServerError. CLI and Portal both fail. Other extensions (vector, uuid-ossp) work fine.

Azure Database for PostgreSQL

3 answers

Sort by: Most helpful
  1. Saraswathi Devadula 15,930 Reputation points Microsoft External Staff Moderator
    2026-04-20T11:59:56.8233333+00:00

    Hey **HAKANGOKCOL,

    **Before you can enable azure_ai on your Azure Database for PostgreSQL flexible server instance, you need to add it to your allowlist and check if correctly added by running SHOW azure.extensions;
    https://learn.microsoft.com/en-us/azure/postgresql/extensions/how-to-allow-extensions?tabs=allow-extensions-portal

    Then you can install the extension, by connecting to your target database and running the CREATE EXTENSION command.

    CREATE EXTENSION IF NOT EXISTS azure_ai;
    

    https://learn.microsoft.com/en-us/azure/postgresql/azure-ai/generative-ai-azure-overview

    Once it is done, please retry the operation and let us know the update.

    0 comments No comments

  2. Pilladi Padma Sai Manisha 7,055 Reputation points Microsoft External Staff Moderator
    2026-04-15T12:38:42.8133333+00:00

    Hey HAKANGOKCOL,

    it sounds like you’re trying to enable the new azure_ai extension on a PostgreSQL 18.2 Flexible Server in Sweden Central (Burstable B1ms), but saving the server parameter (azure.extensions) bombs out with an InternalServerError. Other extensions (vector, uuid-ossp) work fine, so let’s walk through the most common checks and workarounds:

    1. Confirm extension availability in the server • Connect to your flexible server (psql/any client) and run:
      
           SELECT name, default_version, installed_version
      
             FROM pg_available_extensions
      
            WHERE name = 'azure_ai';
      
      
      • If azure_ai does not show up here, it isn’t actually available in your region or on that SKU yet—even if the portal dropdown lists it.
    2. Check your current azure.extensions setting • In the same session, run:
      
           SHOW azure.extensions;
      
      
      • Make sure azure_ai isn’t already listed (if it is, skip to step 4).
    3. Try setting the parameter via CLI
      
         az postgres flexible-server parameter set \
      
           --resource-group MyRG \
      
           --name MyPG18Server \
      
           --parameter-name azure.extensions \
      
           --value azure_ai
      
      
      • If this still returns “InternalServerError,” capture the CLI debug log (--debug)—it may show an underlying HTTP or API failure.
    4. Create the extension in your database Once the parameter is saved, in your database run:
      
         CREATE EXTENSION azure_ai;
      
      
      If that succeeds, you’re good to go.
    5. If you still hit an InternalServerError… • It’s likely a service-side rollout issue (azure_ai is still in preview and may not be in every region/SKU). • Try on a Standard SKU instance or a different region (e.g., West Europe) to confirm. • If it works elsewhere, we’ll escalate to the product team to enable it in Sweden Central. • Open a support ticket and include: – The output of SELECT * from pg_available_extensions WHERE name='azure_ai'; – CLI debug logs showing the InternalServerError – Server name, region, SKU, and timestamp of your operations

    Hope that helps! Let me know what you see when you run those checks.

    References

    • PostgreSQL extensions for Flexible Server (list and how-to)

    https://learn.microsoft.com/azure/postgresql/flexible-server/concepts-extensions

    • List of extensions and modules by PostgreSQL 18 version (azure_ai listed)

    https://learn.microsoft.com/azure/postgresql/extensions/concepts-extensions-by-engine?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#postgresql-18

    • Integrate Azure AI into PostgreSQL (azure_ai overview)

    https://learn.microsoft.com/azure/postgresql/integration/how-to-integrate-azure-ai?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider

    Note: This content was drafted with the help of an AI system. Please verify the information before relying on it for decision-making.


  3. Q&A Assist
    2026-04-15T10:39:38.1866667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    For PostgreSQL 18.2 flexible server, the azure_ai extension is supported and listed with version 2.0.0 in the extensions matrix, so it should be usable on that engine version.

    However, before enabling azure_ai on an Azure Database for PostgreSQL flexible server, it must be explicitly added to the server’s extension allowlist. If azure_ai appears in the azure.extensions dropdown but saving the parameter change fails with InternalServerError (both in Portal and CLI), the most likely causes are:

    1. The extension isn’t correctly added/committed in the server’s allowlist configuration.
    2. There is a transient or regional platform issue when applying the parameter change.

    To validate and proceed:

    1. Confirm azure_ai is allowlisted
      • Follow the steps in the “how to use PostgreSQL extensions” guidance referenced by the Azure AI extension article to add azure_ai to the allowlist.
      • After updating the allowlist, connect to the server and run:
             SHOW azure.extensions;
        
        Ensure azure_ai appears in the returned list.
    2. Install the extension in the database
      • Once the allowlist is correctly configured and the parameter change has been applied by the service, connect to the target database and run:
             CREATE EXTENSION IF NOT EXISTS azure_ai;
        
      • If this succeeds, the extension will create the azure_ai, azure_openai, and azure_cognitive schemas and be ready for use.
    3. If InternalServerError persists
      • Since other extensions such as pgvector and uuid-ossp work, and azure_ai is officially supported for the engine version, a persistent InternalServerError when saving the parameter is indicative of a backend/service issue rather than configuration.
      • In that case, capture the time of failure and the server name and open an Azure support ticket so the service team can inspect the failing operation in the Sweden Central region.

    References:

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.