Skip to content

Querywake for Supabase

Querywake detects PostgreSQL performance regressions from the statistics Supabase already keeps in pg_stat_statements, and shows the evidence for each likely cause. This page says how to connect a Supabase database and what Querywake has and has not checked on Supabase.

Status

Documented, not yet verified by Querywake.

Reviewed

Against Supabase's documentation on .

Status

The steps below follow Supabase's published documentation. Documented, not yet verified by Querywake.

PostgreSQL versions: Provider-, plan- and region-dependent; confirm your instance major.

How to connect

  • Self-hosted collector. Not live-certified. The collector is the option for private networks. You run one small read-only process on a host that can reach Supabase; the connection string stays on that host.
  • Connection string. Direct is IPv6 by default. From IPv4, use the shared Supavisor session mode (5432) and its project-qualified username. On the shared pooler, 6543 (transaction mode) is refused. The dedicated transaction pooler on the project's 6543 endpoint is also refused. Not open on querywake.dev yet; use the collector.
  • Example host: db.<project-ref>.supabase.co:5432
  • TLS: verify-full. Use the CA from the Supabase dashboard if the endpoint requires it.

Monitoring role

Check the installed extension and whether the provider administrator can grant effective statistics visibility.

-- As an administrator, once. The collector never needs superuser.
CREATE ROLE querywake LOGIN PASSWORD '<choose a password>';
GRANT pg_read_all_stats TO querywake;         -- read statistics of all sessions and statements
ALTER ROLE querywake CONNECTION LIMIT 5;

-- In the database the collector connects to:
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;

The role needs no superuser and no access to your tables. Querywake refuses administrator logins and roles that can write. Check that the grant gives effective statistics access before you rely on it.

What works on Supabase

  • Regression detection and cause analysis use pg_stat_statements and the standard statistics views, so they do not depend on the provider beyond the grant above.
  • Plan comparison of EXPLAIN output you upload works on every plan, whatever the provider.
  • Automatic plan capture and PostgreSQL log events read PostgreSQL's jsonlog files on the database host. Supabase does not give your hosts those files, and Querywake has not verified them on Supabase.

Things to check

  • Do not add public addresses, authorized networks or allow-list entries to make a hosted connection work; use the collector inside the private network instead.
  • Querywake has not verified PostgreSQL 19 on this provider. Check that the provider offers it before choosing it, and expect no Querywake claim for it until it is verified.

Connection errors and their fixes are listed under Troubleshooting in the setup guide.