System design: a multi-tenant schema
"Design a multi-tenant schema for a SaaS with orgs, members and roles" is the single most common whiteboard question a Postgres-backed shop asks. Everyone can draw three boxes and an arrow. What separates a hire from a rejection is what happens next: can you show WHERE the isolation is actually enforced, defend it against the one attack that always comes up (a user reassigning a row into an org they do not belong to), and explain the error you will hit the first time you write the naive version.
try to break it
you drive.
membershipsselect * from membershipsinfinite recursion detected in policy for relation "memberships" — the policy reads memberships to decide who may read memberships. Every query fails, for every user, including a bare select *.
documentsselect title from documentsThe helper doesn't exist yet, so there's no working policy to reuse here either — this card is only unblocked once the left one is fixed.