Re: pgsql: Code review for row security. - Mailing list pgsql-committers

From Andres Freund
Subject Re: pgsql: Code review for row security.
Date
Msg-id 20140925130047.GA9633@alap3.anarazel.de
Whole thread Raw
In response to pgsql: Code review for row security.  (Stephen Frost <sfrost@snowman.net>)
Responses Re: pgsql: Code review for row security.  (Stephen Frost <sfrost@snowman.net>)
List pgsql-committers
On 2014-09-24 20:33:54 +0000, Stephen Frost wrote:
> Code review for row security.
>
> Buildfarm member tick identified an issue where the policies in the
> relcache for a relation were were being replaced underneath a running
> query, leading to segfaults while processing the policies to be added
> to a query.  Similar to how TupleDesc RuleLocks are handled, add in a
> equalRSDesc() function to check if the policies have actually changed
> and, if not, swap back the rsdesc field (using the original instead of
> the temporairly built one; the whole structure is swapped and then
> specific fields swapped back).  This now passes a CLOBBER_CACHE_ALWAYS
> for me and should resolve the buildfarm error.

I've not really looked at the code, but I doubt
        if (policy1->hassublinks != policy2->hassublinks);
            return false;
was what you intended. Note the trailing ";".

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Return NULL from json_object_agg if it gets no rows.
Next
From: Stephen Frost
Date:
Subject: Re: pgsql: Code review for row security.