Reset Database Password fails silently — role "postgres" cannot be altered ("permission denied to alter role") #50374
Unanswered
joseniltonbomfim40-ai
asked this question in
Questions
Replies: 1 comment
|
This is a known platform permission boundary, not something you can fix client-side. Why it fails: On hosted Supabase, Workaround today:
Free RLS/grants audit queries (catalog-level, read-only): https://github.com/cekuu35/supabase-rls-leak-demo |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The "Reset database password" feature in the Dashboard (Project Settings → Database) reports success and displays a new generated password, but the password is never actually applied — the underlying ALTER USER postgres WITH PASSWORD ... statement executed by the dashboard itself fails server-side with a permission error.
Confirmed via postgres_logs at the exact timestamp of a reset attempt:
2026-09-15T00:34:54.617Z — statement: ALTER USER postgres WITH PASSWORD '{REDACTED}';
-- source: dashboard
-- user: session:0a3b5f20-a6aa-4f5c-a32b-f3f1e31acb42
-- date: 2026-09-15T00:34:53.759Z
2026-09-15T00:34:54.617Z — permission denied to alter role
The comment -- source: dashboard confirms this was triggered by the official "Reset database password" UI action, not a manual SQL Editor query. I also confirmed manually running ALTER USER postgres WITH PASSWORD '...' via the SQL Editor fails identically with "ERROR: 42501: permission denied to alter role — Only superusers can alter privileged roles."
Impact: I'm unable to obtain a working password for the postgres role, which blocks any external Postgres connection (direct or via the Session/Transaction pooler) using database credentials — for example, pg_dump-based backups via GitHub Actions consistently fail with FATAL: password authentication failed for user "postgres" no matter how many times the password is reset through the dashboard, because the reset never actually takes effect.
Request: Please investigate why the postgres role on this project cannot be altered even through the official dashboard flow (which should run with sufficient privilege), and manually apply a working password reset on your end so I can restore working database-credential access.
Thank you.
All reactions