Azure database for Postgres Flexible server - Why creating extension requires azure_pg_admin role?

Cuong Tran 0 Reputation points
2024-12-31T03:22:37.6833333+00:00

My question is with respect to Azure Database for Postgres Flexible server

Currently, I have faced the issue when creating an extension, it said that the user should be a member of azure_pg_admin. However, this was not the case a couple of months back as we were able to create extensions without an explicit azure_pg_admin role assigned to the database owner.

It seems to me that something has changed recently in this area.

Therefore, can you assist in providing any release notes or announcements that state the changes?

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Shikha Ghildiyal 1,855 Reputation points Microsoft Employee
    2024-12-31T04:03:39.6433333+00:00

    Hi Cuong Tran,

    As per the MS documentation, here are the details -

    After an extension is allowlisted and, if the extension requires it, is also added to shared_load_libraries, it can be created or installed in each database on which it's to be used.

    1. To create an extension, a user must be a member of the azure_pg_admin role.
    2. Run the CREATE EXTENSION command to create or install a particular extension. This command loads the packaged objects into your database.

    As per above details, it is confirmed that user must be a member of the azure_pg_admin role. I can see the document is updated two weeks back hence there is a possibility that this change is introduced two weeks back.

    Reference Document - https://learn.microsoft.com/en-us/azure/postgresql/extensions/how-to-allow-extensions?tabs=allow-extensions-portal%2Cload-libraries-portal

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.