For slow PostgreSQL reads protected by RLS, inspect EXPLAIN as the actual application role
For slow PostgreSQL reads protected by RLS, inspect EXPLAIN as the actual application role and check whether time limits appear in Index Cond or only Filter. A correct composite index can still scan a person's entire history when the predicate includes non-leakproof timestamp ari…