Search code examples
postgresqlazureazure-database-postgresql

Azure PostgreSQL cant Assign BYPASSRLS to a ROLE


I am trying to create a role in Azure PostgreSQL that is allowed to bypass row level security so I can run backups which do not fail when row level security is enabled for all users apart from my backup user:

ALTER TABLE jobschedule.jobs ENABLE ROW LEVEL SECURITY;
ALTER TABLE jobschedule.jobs FORCE ROW LEVEL SECURITY;

When I try and assign the role using the admin supplied by Azure I get the following error message:

ALTER ROLE srvdevadmin BYPASSRLS;
ERROR: must be superuser to change bypassrls attribute

I checked the privileges and it seems that it is not possible in Azure PostgreSQL to assign superuser to a user. Any ideas how I can assign BYPASSRLS to users?


Solution

  • As an update to any one who is trying to do this, I contacted Azure support and they confirmed at the present time it is not possible in Azure PostgreSQL to assign BYPASSRLS to a role and the product team has no plans to implement this.

    https://feedback.azure.com/d365community/idea/685472e3-ee24-ec11-b6e6-000d3a4f0da0

    I created a suggestion on their feedback site so if you would like this functionality it is probably worth up-voting it.