Re:Improving RLS planning

2022-07-07 Thread Zhao Rui
This patch causes wrong index scan plan with RLS. Maybe function restriction_is_securely_promotable is too strict? You can reproduce in this way: create table abc (a integer, b text); insert into abc select (random()*(10^4))::integer, (random()*(10^4))::text from generate_series(1,10); c

Re:Improving RLS planning

2022-07-07 Thread Zhao Rui
This causes wrong index scan with RLS. Maybe function restriction_is_securely_promotable is too strict? You can reproduce in this way: create table abc (a integer, b text); insert into abc select (random()*(10^4))::integer, (random()*(10^4))::text from generate_series(1,10); create index