Re: ALTER TABLE lock strength reduction patch is unsafe

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLE lock strength reduction patch is unsafe
Date: 2014-02-27 08:12:47
Message-ID: CA+U5nMLTUdSQhNDeR_egYo1G4=k7kC87_A0bF_eeCsxoFggazQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26 February 2014 15:25, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:

>> >> > * Why does ChangeOwner need AEL?
>> >>
>> >> Ownership affects privileges, which includes SELECTs, hence AEL.
>> >
>> > So?
>>
>> That reply could be added to any post. Please explain your concern.
>
> I don't understand why that means it needs an AEL. After all,
> e.g. changes in table inheritance do *not* require an AEL. I think it's
> perfectly ok to not go for the minimally required locklevel for all
> subcommands, but then it should be commented as such and not with
> "change visible to SELECT" where other operations that do so as well
> require lower locklevels.

Those are two separate cases, with separate lock levels, so that
argument doesn't hold.

My understanding of the argument as to why Inheritance doesn't need
AEL is that adding/removing children is akin to inserting or deleting
rows from the parent.

Removing SELECT privilege while running a SELECT would be a different
matter. This is all a matter of definition; we can make up any rules
we like. Doing so is IMHO a separate patch and not something to hold
up the main patch.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2014-02-27 08:18:02 Re: Unfortunate choice of short switch name in pgbench
Previous Message Christian Kruse 2014-02-27 08:08:33 Re: [PATCH] Use MAP_HUGETLB where supported (v3)