Unable to connect to read replica even using pooler

Hi Supabase Support Team,

I’m running into an issue accessing a read replica from an IPv4-only environment, and after extensive debugging this is what i've noticed:

Context:
  • environment is IPv4-only
  • direct database and replica hostnames of the form: db.<project>-rr-<region>.supabase.co
    are IPv6-only, so they are not reachable from my environment. I can successfully connect to the primary database via the Supabase pooler: aws-0-<primary-region>.pooler.supabase.com using the postgres user over IPv4
What i've tried:
  • Connecting to the pooler with: target_session_attrs=read-only This consistently fails with: session is not read-only
even though a read replica exists and is healthy.

Using the documented / community-recommended approach of connecting via the pooler as:

supabase_read_only_user.<project_ref>

However, this role does not exist in our project:

ERROR: role "supabase_read_only_user.<project_ref>" does not exist

Attempting to create our own read-only role:
  • The role can be created successfully in Postgres
But authentication through the Supabase pooler fails with:
  • FATAL: Tenant or user not found
This suggests the pooler only allows specific managed users.

Conclusion:
  • Direct replica access is IPv6-only
  • IPv4 access requires the pooler
  • Pooler-based replica access requires the built-in supabase_read_only_user - could you confirm this?
Thanks in advance.
Was this page helpful?