Custom PostgreSQL role consistently fails authentication through Supavisor despite verified credentials #50229
Replies: 2 comments 3 replies
|
how are you connecting to it and what is exact error you are seeing? |
|
Supavisor does not need a separate registration for this custom role. Its auth query reads the role secret from I would first check the login attributes without changing anything: select
rolname,
rolcanlogin,
rolvaliduntil,
rolpassword is not null as has_password,
case
when rolpassword like 'SCRAM-SHA-256$%' then 'scram-sha-256'
when rolpassword like 'md5%' then 'md5'
when rolpassword is null then 'missing'
else 'other'
end as password_format
from pg_authid
where rolname = 'ee_backup_ro';Permissions such as Then test the same secret through each path: # Direct Postgres, if your network supports the project's direct endpoint
PGPASSWORD="$EE_BACKUP_PASSWORD" psql \
"host=db.<project-ref>.supabase.co port=5432 dbname=postgres user=ee_backup_ro sslmode=require" \
-c 'select current_user'
# Shared pooler, session mode
PGPASSWORD="$EE_BACKUP_PASSWORD" psql \
"host=<host copied from Connect> port=5432 dbname=postgres user=ee_backup_ro.<project-ref> sslmode=require" \
-c 'select current_user'
# Shared pooler, transaction mode
PGPASSWORD="$EE_BACKUP_PASSWORD" psql \
"host=<same host> port=6543 dbname=postgres user=ee_backup_ro.<project-ref> sslmode=require" \
-c 'select current_user'This separates the cases:
Use the exact pooler host from the Dashboard's Connect dialog; the References: Supabase connection modes and custom-role username format, Supavisor authentication query, and the hosted |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I need help investigating a Supavisor authentication failure for a production PostgreSQL read-only role.
We created the production role
ee_backup_rofor backups/exports. The role has been independently verified as read-only across the required production schema:rolvaliduntil = NULLI'm connecting via PostgreSQL through the Supabase transaction pooler (Supavisor), using the project-scoped pooler credentials:
Host: aws-0-eu-west-1.pooler.supabase.com
Port: 6543
User: ee_backup_ro.
Password supplied via the PGPASSWORD environment variable
Database: postgres
I'm testing with a standard PostgreSQL client (psql), rather than through the Supabase API or dashboard.
The direct PostgreSQL role/permissions have already been verified. The failure occurs specifically when authenticating through Supavisor.
The PostgreSQL role and permissions are correct.
The problem occurs only when connecting through Supavisor.
We are using the canonical pooler endpoint:
aws-0-eu-west-1.pooler.supabase.com:6543with the tenant-scoped username:
ee_backup_ro.<production-project-reference>The password has been independently verified against our password manager. We supply it through
PGPASSWORD, so URL encoding/special-character escaping is not involved.We previously tested
aws-1-eu-west-1.pooler.supabase.com, which returned a tenant/user resolution error. This indicates thataws-1is not the correct pooler endpoint for this project. Theaws-0endpoint reaches authentication but rejects the credentials with a password/authentication failure.This makes us suspect a Supavisor-side credential synchronization, caching, tenant mapping, or authentication issue rather than an incorrect PostgreSQL role or password.
Please investigate:
ee_backup_ro.Please do not reset the production password, restart the project, or make destructive production changes without first explaining the required action and receiving our approval.
The role must remain strictly read-only.
We would specifically like to know whether Supabase can repair or refresh the relevant Supavisor authentication state server-side without changing the verified production credentials.
Thank you.
All reactions