Most multi-tenant applications keep tenants apart with one line of code,
repeated forever:
SELECT * FROM documents WHERE organization_id = $1
Enter fullscreen mode
Exit fullscreen mode
Most multi-tenant applications keep tenants apart with one line of code, repeated forever: SELECT...
Most multi-tenant applications keep tenants apart with one line of code,
repeated forever:
SELECT * FROM documents WHERE organization_id = $1
Enter fullscreen mode
Exit fullscreen mode

Skip the ORM magic and implement true RLS policies with SQLAlchemy to isolate tenant data at the database layer, not the…

Most backend engineers implement multi-tenant quota checks using a standard "read-then-write"...

A wrong RLS policy doesn't throw an error, it just returns the wrong rows, so it ships untested and...

Lomi is a SaaS for dog kennels in Colombia, and it has two kinds of tenancy at once: each kennel is a...

TL;DR: app-layer filtering is a single point of failure. Push tenant isolation into Postgres with RLS...

There are many ways to slice a Postgres database for multi-tenant applications. Let's look at the three most common approaches…