PlanetScale

Approaches to tenancy in Postgres

Apr 21, 2026Simeon Griggs
Approaches to tenancy in Postgres
SummaryAI, from the source post

This post clarifies multi-tenancy approaches in Postgres, recommending shared-schema for scalability and simplicity. It details tenant modeling, filtering strategies (including a discussion and general non-recommendation of RLS), and the benefits of partitioning for shared-schema. It also contrasts shared-schema with schema-per-tenant and database-per-tenant approaches, highlighting their drawbacks at scale. The post provides concrete SQL examples for shared-schema table creation, indexing, and partitioning, and discusses tenant data lifecycle management (onboarding and offboarding) in the context of partitioning.

More from the HTAP Database Concepts trail