01Row Level Security over a collection per tenant
- Decision
- Keep all tenants in one table and let a Postgres policy enforce isolation on every statement.
- Alternatives
- A separate vector collection or database per tenant, or tenant filters written by hand in each query.
- Why
- Isolation becomes a property of the database rather than of developer discipline, onboarding a tenant is an insert instead of provisioning, and relational data and vectors share one transaction.
- Cost of being wrong
- One large index serves every tenant, so a very large tenant affects the others; past a certain size that tenant needs partitioning or its own instance.