PostgreSQL

PostgreSQL SaaS concepts


PostgreSQL SaaS concepts

Supabase starts with PostgreSQL. Treat the database as the system of record, then expose carefully designed access paths through policies, APIs, functions, and realtime subscriptions.

Model the product domain in PostgreSQL#

Use tables, relationships, JSON, and arrays to model your product data. Keep tenant, organization, or workspace ownership explicit so access policies can be reviewed and tested.

Put authorization close to the data#

Use secure data and Auth claims to make Row Level Security the default boundary for user-facing data. Keep privileged server-side operations separate and document every path that uses service-role credentials.

Design for growth#

Before launch, review connection management, query optimization, debugging performance, and replication. Production SaaS teams should understand pooler behavior, indexes, long-running queries, and replica-read patterns.

Extend PostgreSQL deliberately#

Supabase exposes PostgreSQL extensions, functions, webhooks, cron jobs, queues, and vector workloads. Start with extensions, functions, database webhooks, Cron, Queues, and AI guides when the product needs more than CRUD.