© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4mo ago•
9 replies
amar

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

🟢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"}
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
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.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Can't delete users from dashboard
SupabaseSSupabase / help-and-questions
7mo ago
I can't delete folder in dashboard
SupabaseSSupabase / help-and-questions
8mo ago
Can't delete or disable cron job
SupabaseSSupabase / help-and-questions
5mo ago
Can't create a folder or a file in SQL editor
SupabaseSSupabase / help-and-questions
10mo ago