dbTalk Databases Forums  

[BUGS] BUG #6422: User without any priviledges on a table can lock the tablefrom other users in some cases

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #6422: User without any priviledges on a table can lock the tablefrom other users in some cases in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
maxim.boguk@gmail.com
 
Posts: n/a

Default [BUGS] BUG #6422: User without any priviledges on a table can lock the tablefrom other users in some cases - 01-30-2012 , 09:41 PM






The following bug has been logged on the website:

Bug reference: 6422
Logged by: Maxim Boguk
Email address: maxim.boguk (AT) gmail (DOT) com
PostgreSQL version: 9.1.2
Operating system: Linux
Description:

Hi.

Unfortunately I was hit by that problem in the real project.

During active pg_dump (or any long transaction keeping lock on table), any
users with access to database can lock table from access, even if that user
have absolutely no rights on that table.

Test scenario:

1)CREATE ROLE dummy with login password 'something';

2)start pg_dump on database or any long transactions involving table news


3)now:
psql -U dummy -d testdb

=> SELECT * from news;
ERROR: permission denied for relation news

That perfectly ok...

sports=> begin;
BEGIN
sports=> lock table news;
oops... table locked from everyone access untill canceled or pg_dump
finished

(and in realily - large web site down for 3 minute until my intervention).


The same can be done with any
alter table news ... ; statement.

Again I not sure is it an actual bug or feature. Seems Postgres trying to
put a lock on the table before check grants.

May be it's possible to check grants before set any heavy lock on the
table?

That behavior could be very troublesome in multi-user database environment.





--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.