PostgreSQL Row-Level Security for Multi-Tenant Tables: Policies, Pools, and Bypass Rules
A tenant policy that fails closed, setting the tenant safely through a pool, and the roles that bypass RLS, tested on PostgreSQL 18.6, including a leak through a reused connection.