Permission denied for schema cron

Sokkenissen 31 Reputation points

Hi there!

I am trying to configure the pg_cron extension on our postgresql 13 flexible server, however, I've been stuck for a while now trying to figure out how I am suppose to do anything with the cron schema.

I've added pg_cron to the azure.extensions list, and to the shared_preload_libraries. The value of cron.database_name is currently left as postgres (I did try to change this to our primary database while attempting to figure things out, but I set it back to default when I saw that it did not help).

So when I log into the postgres database as admin and do show azure.extensions I can see that PG_CRON is in the list. \dx also displays the extension as installed/created.

However, when I try to insert a new cron-job, I always get ERROR: permission denied for schema cron. If I do \dn cron I can see that the owner is azuresu. The role I am logged in with is member of azure_pg_admin, however, that does not give me permissions to do grants or anything of that sort regarding the schema...

Am I missing a config parameter or setting? As mentioned I tried to change the cron.database_name and create the extension there just to see, but I get the same message.

Any help or tips would be appreciated!

Azure Database for PostgreSQL
{count} vote

Accepted answer
  1. GeethaThatipatri-MSFT 27,987 Reputation points Microsoft Employee

    Hi, @Sokkenissen Issue has been fixed, please use the admin user on your server and try again.

0 additional answers

Sort by: Most helpful