You're using 10% of Postgres RLS: FORCE RLS, security_invoker and more

_jaydeepkarale · x · 2026-11-19

Most teams write one tenantid RLS policy and stop. This thread covers the rest: FORCE ROW LEVEL SECURITY to stop owners bypassing rules, passing tenant IDs via session state, securityinvoker = true (Postgres 15+) so views check RLS as the caller, and wrapping tenant lookups in (SELECT ...) so policies run once per query.

Original post →

More from coding & agent

coding & agent channel →