Re: [HACKERS] [PATCH] Lockable views - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] [PATCH] Lockable views
Date
Msg-id CAB7nPqQ3s+3Q8W=1EiLCmHonr=RGHfe0yEMN4JYQvY+SmhR7=w@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH] Lockable views  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] [PATCH] Lockable views  (Yugo Nagata <nagata@sraoss.co.jp>)
List pgsql-hackers
On Fri, Oct 27, 2017 at 2:11 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Oct 11, 2017 at 11:36 AM, Yugo Nagata <nagata@sraoss.co.jp> wrote:
>> In the attached patch, only automatically-updatable views that do not have
>> INSTEAD OF rules or INSTEAD OF triggers are lockable. It is assumed that
>> those views definition have only one base-relation. When an auto-updatable
>> view is locked, its base relation is also locked. If the base relation is a
>> view again, base relations are processed recursively. For locking a view,
>> the view owner have to have he priviledge to lock the base relation.
>
> Why is this the right behavior?
>
> I would have expected LOCK TABLE v to lock the view and nothing else.
>
> See http://postgr.es/m/AANLkTi=KupesJHRdEvGfbT30aU_iYRO6zwK+fwwY_sGd@mail.gmail.com
> for previous discussion of this topic.

That's what I would expect as well.. But I may be missing something. I
am marking the patch as returned with feedback as this has not been
replied in one month.
-- 
Michael


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] postgres_fdw: support parameterized foreign joins
Next
From: Alvaro Herrera
Date:
Subject: Re: PG10.1 autovac killed building extended stats