Re: INSERT ... ON CONFLICT UPDATE and RLS

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, David Fetter <david(at)fetter(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: INSERT ... ON CONFLICT UPDATE and RLS
Date: 2015-01-12 19:23:33
Message-ID: CAEZATCVfn+BUKmWi+tLyi=jHK=WAUYi6zG7c5-xODCOOkTiC_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12 January 2015 at 14:24, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> Looking at the regression tests a bit though, I notice that this removes
> the lower-level LockRows.. There had been much discussion about that
> last spring which I believe you were a part of..? I specifically recall
> discussing it with Craig, at least.
>

Ah, yes you're right. Looking back over that discussion it shouldn't
be removing those lower-level LockRows. I was a bit aggressive with my
change to the rowmark preprocessing -- the first loop applies to
requested locks, like SELECT .. FOR UPDATE, so it shouldn't be messing
with that, presecurity.c handles that fine. It's only the second loop
that needs to be taught about RTEs with security quals that will
become subqueries.

Here's an updated patch, that passes with the original regression test results.

Regards,
Dean

Attachment Content-Type Size
rls.v2.patch text/x-diff 14.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-01-12 19:38:36 Re: parallel mode and parallel contexts
Previous Message Alvaro Herrera 2015-01-12 18:40:19 Re: replicating DROP commands across servers