On Tue, May 12, 2009 at 14:40, Alex Hunsaker <bada...@gmail.com> wrote:
> Hrm on second thought I think your right.  They only get the lock
> until the permission check, and I have a hard time seeing how someone
> can take real advantage of that.  The owner that is trying to lock
> table should get the lock almost immediately even if there are say a
> few hundred non-owner clients trying to lock it.

FWIW i just tested this with ~100 clients doing begin; ALTER TABLE
test_lock ADD COLUMN  commit; here is the timing.  Is there some other
concern that im not seeing?

(pre 100 clients)
=> LOCK table test_lock;
LOCK TABLE
Time: 1.955 ms

(now with 100 non-owner clients trying to do ALTER TABLE)
=> LOCK TABLE test_lock;
LOCK TABLE
Time: 71.746 ms

*shrugs*

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

Reply via email to