The dashboard loads. Numbers look wrong. You dig in and see it: row-level security failed.
Row-level security (RLS) controls which rows a user can read or modify. It’s supposed to keep sensitive data isolated. The pain point comes when permissions are complex, queries are dynamic, and data sits across multiple tables. One broken policy can expose private records or cause users to lose access they need.
Common problems start with policy sprawl. Too many rules pile up over time. Each layer interacts with others, making logic hard to track. Even simple queries may trigger unexpected joins that bypass filters. Misaligned user roles add another failure point. If your identity layer and database role mapping drift apart, RLS breaks silently.
Performance can hurt too. Each request must evaluate RLS conditions. Improper indexes or overly complex predicates increase query time. Slow responses frustrate users and encourage unsafe workarounds.