Re: Index selection issues with RLS using expressions

2020-04-01 Thread Stephen Frost
Greetings, We prefer to use in-line responses, please don't top-post on these lists. * Alastair McKinley (a.mckin...@analyticsengines.com) wrote: > Thanks for looking at this! It seems like there are quite a few performance > gotchas around leaky operators and RLS, this is my second encounter w

Re: Index selection issues with RLS using expressions

2020-04-01 Thread Alastair McKinley
: Re: Index selection issues with RLS using expressions Hi Tom, Thanks for looking at this! It seems like there are quite a few performance gotchas around leaky operators and RLS, this is my second encounter with this issue in the last few weeks. What would you recommend as a reasonable

Re: Index selection issues with RLS using expressions

2020-03-31 Thread Alastair McKinley
From: Tom Lane Sent: 31 March 2020 20:18 To: Alastair McKinley Cc: pgsql-general@lists.postgresql.org Subject: Re: Index selection issues with RLS using expressions Alastair McKinley writes: > I am running in to an issue with RLS and index selection in my queries. I > created

Re: Index selection issues with RLS using expressions

2020-03-31 Thread Tom Lane
Alastair McKinley writes: > I am running in to an issue with RLS and index selection in my queries. I > created a toy example to try to illustrate the issue below. Postgres version > is PostgreSQL 12.2 (Debian 12.2-2.pgdg100+1) on x86_64-pc-linux-gnu, compiled > by gcc (Debian 8.3.0-6) 8.3.0,

Index selection issues with RLS using expressions

2020-03-31 Thread Alastair McKinley
Hi all, I am running in to an issue with RLS and index selection in my queries. I created a toy example to try to illustrate the issue below. Postgres version is PostgreSQL 12.2 (Debian 12.2-2.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit. Is there some su