I have a Postgres 11 instance on Azure and I am trying to execute simple script to create and assign role to user:
CREATE ROLE testRole;
GRANT testRole TO my_user;
Although after i run this i get:
ERROR: only superusers can grant role "pg_execute_server_program"
SQL state: 42501
I am not sure why does it even want to grant pg_execute_server_program role even though i am not assigning it anywhere to testRole. I don't even care about this role and would gladly create user without it.
This code was working without problems until Microsoft decided to bump up minor postgres version from 11.11 to 11.12. Any ideas what I am doing wrong in this case?
CodePudding user response:
It was bug introduced by Microsoft. It seems to be fixed now. I created fresh Postgres instance and it works.
If you are not able to simply recreate Postgres instance, scaling it up and down again should also fix it (although I haven't tried that)
I got following answer from Microsoft support:
The fix was rolled out and the issue should now be fixed. Could you please try again?
If the error persists, please scale up the server and then back down again, or down and up, and try again.
