Re: BUG #5609: Exclusive Locks & Permission

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rob Brucks" <rob(dot)brucks(at)rackspace(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5609: Exclusive Locks & Permission
Date: 2010-08-09 19:40:34
Message-ID: 12650.1281382834@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Rob Brucks" <rob(dot)brucks(at)rackspace(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rob Brucks 2010-08-09 19:47:02 Re: BUG #5609: Exclusive Locks & Permission
Previous Message Robert Haas 2010-08-09 19:15:00 Re: BUG #5587: Installer non-default file association problem