The following bug has been logged on the website:
Bug reference: 6422
Logged by: Maxim Boguk
Email address: maxim(dot)boguk(at)gmail(dot)com
PostgreSQL version: 9.1.2
Operating system: Linux
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.
1)CREATE ROLE dummy with login password 'something';
2)start pg_dump on database or any long transactions involving table news
psql -U dummy -d testdb
=> SELECT * from news;
ERROR: permission denied for relation news
That perfectly ok...
sports=> lock table news;
oops... table locked from everyone access untill canceled or pg_dump
(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
That behavior could be very troublesome in multi-user database environment.
pgsql-bugs by date
|Next:||From: Bridget Frey||Date: 2012-01-31 04:07:10|
|Subject: Re: BUG #6200: standby bad memory allocations on SELECT|
|Previous:||From: Tom Lane||Date: 2012-01-31 03:00:36|
|Subject: Re: BUG #6200: standby bad memory allocations on SELECT |