SupabaseS
Supabase3mo ago
amar

Can't delete a db role from the dashboard or SQL

Something has gone wrong and we're stuck with a database role. It can't be deleted from the dashboard or using SQL. Here's the error message:

Failed to delete database role: Failed to run sql query: {"error":"ERROR: 42501: permission denied to drop role\nDETAIL: Only roles with the CREATEROLE attribute and the ADMIN option on role \"metabase_app\" may drop this role.\nCONTEXT: SQL statement \"drop role metabase_app;\"\nPL/pgSQL function inline_code_block line 56 at EXECUTE\n","length":285,"name":"error","severity":"ERROR","code":"42501","detail":"Only roles with the CREATEROLE attribute and the ADMIN option on role \"metabase_app\" may drop this role.","where":"SQL statement \"drop role metabase_app;\"\nPL/pgSQL function inline_code_block line 56 at EXECUTE","file":"user.c","line":"1175","routine":"DropRole","message":"permission denied to drop role","formattedError":"ERROR: 42501: permission denied to drop role\nDETAIL: Only roles with the CREATEROLE attribute and the ADMIN option on role \"metabase_app\" may drop this role.\nCONTEXT: SQL statement \"drop role metabase_app;\"\nPL/pgSQL function inline_code_block line 56 at EXECUTE\n"}


This is preventing us from setting up supabase locally as well, as we get errors saying the metabase_app user couldn't be found. I've tried many different things, logging in with different users, trying to transfer objects owned or transfer ownership to another user, but nothing works. Looks like a bug causing a permission denied endless loop. Would appreciate some help.
Was this page helpful?