Search Postgresql Archives

Re: Fwd: row level security (RLS)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2021-03-15 at 16:28 +0100, Rafal Pietrak wrote:
> 5. My experiments with RLS was like following:
>         - I've implemented a STABLE function, that returns INTEGER 1/0
>         - I've linked that function as POLICY to my tables
>         - I've GRANTED PUBLIC access to those tables
>         ---> and all works as predicted.... only slow (10x slower!).
>
> [lots of questions about how to solve this is some other way]
>
> Those questions come from my bad experience with POLICY performance.

You should figure out why RLS was so slow.

The key to this is "EXPLAIN (ANALYZE, BUFFERS)" for the query -
that will tell you what is slow and why, so that you can tackle the
problem.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux