Re: BUG #5609: Exclusive Locks & Permission

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

Sorry about that, I hit the submit button on accident before I finished typing out the issue. But I guess there was enough there for you to understand the problem.

Thanks for the quick response.

Is there any alternative I can use to prevent the exclusive lock (other than changing the app, we don't have access to the source code)?

Thanks,
Rob

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, August 09, 2010 2:41 PM
To: Rob Brucks
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #5609: Exclusive Locks & Permission

"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

Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace.
Any dissemination, distribution or copying of the enclosed material is prohibited.
If you receive this transmission in error, please notify us immediately by e-mail
at abuse(at)rackspace(dot)com, and delete the original message.
Your cooperation is appreciated.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-08-09 20:21:01 Re: BUG #5609: Exclusive Locks & Permission
Previous Message Tom Lane 2010-08-09 19:40:34 Re: BUG #5609: Exclusive Locks & Permission