Key facts (Supavisor docs, last edited 2026-04-08):
−- Ports and modes: transaction-mode pooling is typically exposed on port 6543 and is recommended for serverless/edge workloads; session-mode (full session semantics) is available on port 5432 (direct/session) and is needed for prepared statements, session-local GUCs, LISTEN/NOTIFY scoping, or any feature that depends on a stable backend per client. (Source: Supavisor FAQ)
+- Ports and modes: transaction-mode pooling is exposed on port 6543 and is recommended for serverless/edge workloads; session-mode (full session semantics) is available on port 5432 (direct/session) and is needed for prepared statements, session-local GUCs, LISTEN/NOTIFY scoping, or any feature that depends on a stable backend per client. (Source: Supavisor FAQ & Troubleshooting pages, 2026-04-08)
- Use case: Transaction mode lets the pooler reuse server connections for short-lived transactions, avoiding the cost of creating a Postgres backend process for every client request.
- Caveats: Transaction-mode pooling breaks session-level features including prepared statements, some server-side cursors, session-local configuration, and the scoping semantics of LISTEN/NOTIFY. If your application or ORM relies on these, use a session-mode connection or adapt your client code. (Source: Supavisor FAQ)
- Pool sizing: Tune both application-side pool settings and the server-side pooler to avoid saturating the database. Supabase exposes Max Client Connections and pool-size controls in the dashboard; monitor pool saturation and queueing under load.
@@ −42 +42 @@
- Test your workload under realistic concurrency; transaction pooling reduces connection counts but introduces query queuing when demand exceeds available pooled server connections.
- Some libraries or drivers (e.g., asyncpg) assume prepared statements. If you run into errors, switch to session-mode or disable server-side prepared statements.
+- Metrics to monitor for pooler health: database max_connections (SHOW max_connections), current active connections (pg_stat_activity), pooler pool size and allocated server connections (as reported in Supabase dashboard), and client queue length / avg queue wait time. Monitor queueing and latency to detect saturation early (Source: Supavisor docs).
### Row Level Security (RLS)
@@ −54 +55 @@
- Auto-enable RLS: Supabase documents an event-trigger pattern you can install to enable RLS for newly created tables automatically (useful for platform workflows that create schemas/tables programmatically).
- Beware the service_role key: it bypasses RLS entirely. Never expose it to untrusted clients.
−Example policy (unchanged):
+Example policy:
CREATE POLICY "Users read own projects"
ON projects FOR SELECT
@@ −66 +67 @@
Recent ecosystem signals to watch:
+- pg_textsearch v1.0 (BM25 scoring) reached production readiness in March 2026 and provides BM25 relevance scoring implemented at the Postgres page level with parallel index builds and disk-backed segments. It is a candidate when you need relevance-ranked search without an external engine; always verify availability in your Supabase project before relying on it. (Source: pg_textsearch v1.0 release notes, 2026-03-27; Postgres ecosystem signals)
−- pg_textsearch v1.0 (BM25 scoring) reached production-readiness in 2026; it provides BM25 relevance scoring implemented at the Postgres page level and supports parallel index builds and disk-backed segments. Consider it when you need relevance-ranked search without switching to an external engine (source: Postgres Weekly, Apr 2026).
+- pg_ivm continues to be a practical option for incremental materialized views. Supabase exposes an extensions dashboard where you can enable supported extensions — check the project dashboard or docs before relying on non-standard extensions.
−- pg_ivm continues to be a practical option for incremental materialized views (signals and updates in the ecosystem indicate active releases). Supabase exposes an extensions dashboard where you can enable supported extensions — check the project dashboard or docs before relying on non-standard extensions.
Extension upgrade note: upgrading an extension may require explicit intervention (or coordinating with Supabase infrastructure) — verify the extension version and test any upgrade on a staging clone.