How can i use pg_default tablespace in azure postgres?

Samhitha Vootkoor 25 Reputation points
2023-02-22T11:55:29.5466667+00:00

I want to create a database in the tablespace=pgdefault but it says permission denied when i ran the command. As an alternative, we tried to create a new table space but failed to do that also, as we are not superuser azuresu. Even the user with azure_pg_admin privileges is not able to access the tablespace or create a new one.

How can we access the pgdefault tablespace or create a new one so that we can use?

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 29,552 Reputation points Microsoft Employee Moderator
    2023-02-27T15:33:52.28+00:00

    @Samhitha Vootkoor

    This can be resolved by granting rights to pg_default to the role like

    ALTER TABLESPACE pg_default

    OWNER TO myusername;

    This appears to be postgrs\pgadmin behavior.

    https://pgadmin-support.postgresql.narkive.com/Mw0i7rF2/pgadmin-8-3-beta-5-error-permission-denied-for-tablespace-pg-default

    https://dba.stackexchange.com/questions/204807/why-do-i-get-a-postgresql-permission-error-when-specifying-a-tablespace-in-the

    Regards

    Geetha


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.