Re: Postgres trigger side-effect is occurring out of order with row-level security select policy

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Carl Sverre <sverre(dot)carl(at)gmail(dot)com>, "Charles Clavadetscher (SwissPUG)" <clavadetscher(at)swisspug(dot)org>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Postgres trigger side-effect is occurring out of order with row-level security select policy
Date: 2018-09-30 21:30:31
Message-ID: 26b52a79-cef2-903c-3696-fc3b6d6cbcb4@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/30/18 1:13 PM, Carl Sverre wrote:
> Thanks for the initial results. Can you check that you are not using
> super permissions and are enabling row security when running the test?
> Super ignores row security.

Yeah, big oops on my part, I was running as superuser. Running as
non-superuser resulted in the failure you see. I tried to get around
this with no success. My suspicion is that the new row in b is not
visible to the returning(SELECT) query in a until after the transaction
completes. Someone with more knowledge on this then I will have to
confirm/deny my suspicion.

>
> Also yes, I forgot to add the policy names, sorry about that.
> On Sun, Sep 30, 2018 at 1:34 AM Charles Clavadetscher (SwissPUG)
> <clavadetscher(at)swisspug(dot)org <mailto:clavadetscher(at)swisspug(dot)org>> wrote:
>
> Hello

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-09-30 21:45:32 Re: Why my query not using index to sort?
Previous Message Arup Rakshit 2018-09-30 20:21:10 Re: Why my query not using index to sort?