When to use Read Replicas vs. bigger compute
Choosing between vertical scaling and Postgres Read Replicas comes down to diagnosing the bottleneck first, using pg_stat_statements, read/write ratio queries, CPU utilization and EXPLAIN ANALYZE.
Choosing between vertical scaling and Postgres Read Replicas comes down to diagnosing the bottleneck first, using pg_stat_statements, read/write ratio queries, CPU utilization and EXPLAIN ANALYZE.
Supabase now supports Postgres read replicas in 12 regions, up to two per project, for offloading reads and analytics, serving data closer to users, and redundancy.
Postgres range partitioning can be retrofitted onto an existing "large table" (here, 500 million chat messages) without blocking queries by creating standalone daily child tables, bulk-loading them, adding a CHECK constraint that matches the partition range, and only then running ATTACH PARTITION so Postgres skips the validation scan and its blocking lock.
Supavisor is a multi-tenant Postgres connection pooler written in Elixir that Supabase built to replace single-threaded PgBouncer.
Supabase now bundles PgBouncer, co-located on the same server as each new project's Postgres, so serverless functions that open a connection per request don't overwhelm the database.