Hacker News new | ask | show | jobs
by cybice 1159 days ago
Performance is huuuge issue with RLS, as it works like an optimization barrier. Because of security RLS rules are applied initially and then all/most indexes you have just not working at all. ITs not like single WHERE clause with injected RLS checks
1 comments

Hmm, I thought this only really applied when you use functions which Postgres can’t reason about. Hence the LEAKPROOF keyword to help with this case.

Either way, I think it underscores that RLS shouldn’t be used for business logic. I’ll update the page to emphasize that more.