Re: BUG #5609: Exclusive Locks & Permission - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5609: Exclusive Locks & Permission
Date
Msg-id 12650.1281382834@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5609: Exclusive Locks & Permission  ("Rob Brucks" <rob.brucks@rackspace.com>)
Responses Re: BUG #5609: Exclusive Locks & Permission
List pgsql-bugs
"Rob Brucks" <rob.brucks@rackspace.com> writes:
> The user's permissions need to be checked before requesting an exclusive
> lock on the table for the alter.

Unfortunately, that cure is as bad or worse than the disease.  It's not
possible to do a permissions check before acquiring any lock --- what if
somebody is changing the permissions under you, or even dropping or
renaming the table?  We could acquire sharelock, do the permissions
check, and then upgrade to exclusive lock; but lock upgrading has its
own unpleasant consequences, notably increased risk of deadlock.

So it's unlikely this is going to get changed.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #5587: Installer non-default file association problem
Next
From: Rob Brucks
Date:
Subject: Re: BUG #5609: Exclusive Locks & Permission