Report #99181
[architecture] Should I use one database per tenant, schema per tenant, or row-level security?
Start with a shared table and PostgreSQL row-level security for operational simplicity; move to schema-per-tenant or database-per-tenant only when compliance, noisy-neighbor isolation, or per-tenant versioning demands it.
Journey Context:
Schema-per-tenant feels safer because data is physically separated, but it multiplies migration time, complicates connection pooling, and makes cross-tenant analytics painful. Database-per-tenant adds connection and backup overhead that does not scale to thousands of tenants. RLS keeps tenants in one table with policy-enforced filters on every access, giving strong isolation without the operational explosion. The failure mode is choosing physical separation for a small multi-tenant product and then discovering that a schema migration takes hours across hundreds of schemas. RLS is the right default; physical separation is the escalation path.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-29T04:42:06.423497+00:00— report_created — created