From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Rafal Pietrak <rafal(at)ztk-rp(dot)eu>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Fwd: row level security (RLS) |
Date: | 2021-03-15 17:01:23 |
Message-ID: | 667a19a588a9cf3a61d185e4cbe285df0a2f3cee.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Avinash Kumar | 2021-03-15 18:21:33 | Re: Postgres crashes at memcopy() after upgrade to PG 13. |
Previous Message | Peter Geoghegan | 2021-03-15 16:18:21 | Re: Postgres crashes at memcopy() after upgrade to PG 13. |
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Mlodgenski | 2021-03-15 17:02:20 | Re: Parser Hook |
Previous Message | Joel Jacobson | 2021-03-15 16:58:34 | Re: Parser Hook |