Re: [HACKERS] NOWAIT doesn't work

2012-10-31 Thread Josh Berkus
> Now, is this the right behavior? I'm not sure. But I know for certain > that making it behave as you expect is very tricky. The table lock is > grabbed during parse analysis; we'd have to postpone grabbing the lock > until after we have had the chance to notice that there's a FOR UPDATE > cla

Re: [HACKERS] NOWAIT doesn't work

2012-10-31 Thread Pavel Stehule
2012/10/31 Alvaro Herrera : > Alvaro Herrera escribió: > >> Now, is this the right behavior? I'm not sure. But I know for certain >> that making it behave as you expect is very tricky. The table lock is >> grabbed during parse analysis; we'd have to postpone grabbing the lock >> until after we h

Re: [HACKERS] NOWAIT doesn't work

2012-10-31 Thread Alvaro Herrera
Alvaro Herrera escribió: > Now, is this the right behavior? I'm not sure. But I know for certain > that making it behave as you expect is very tricky. The table lock is > grabbed during parse analysis; we'd have to postpone grabbing the lock > until after we have had the chance to notice that t

Re: [HACKERS] NOWAIT doesn't work

2012-10-31 Thread Alvaro Herrera
Pavel Stehule escribió: > Hello > > it is expected behave? > > 1.session > > postgres=# begin; > BEGIN > postgres=# lock oo IN ACCESS EXCLUSIVE MODE; > LOCK TABLE > > 2. session > > postgres=# select * from oo for update nowait; > > hangs forever "select for update nowait" would raise a

Re: [HACKERS] NOWAIT doesn't work

2012-10-31 Thread Christian Kruse
Hi, On Wednesday, October 31, 2012 02:51:38 PM Pavel Stehule wrote: > Hello > > it is expected behave? > > 1.session > > postgres=# begin; > BEGIN > postgres=# lock oo IN ACCESS EXCLUSIVE MODE; > LOCK TABLE > > 2. session > > postgres=# select * from oo for update nowait; > > hangs forever .

Re: [HACKERS] NOWAIT doesn't work

2012-10-31 Thread Szymon Guz
On 31 October 2012 14:52, Pavel Stehule wrote: > tested on 9.3 > > Pavel > > 2012/10/31 Pavel Stehule : > > Hello > > > > it is expected behave? > > > > 1.session > > > > postgres=# begin; > > BEGIN > > postgres=# lock oo IN ACCESS EXCLUSIVE MODE; > > LOCK TABLE > > > > 2. session > > > > postgre

Re: [HACKERS] NOWAIT doesn't work

2012-10-31 Thread Andres Freund
On Wednesday, October 31, 2012 02:51:38 PM Pavel Stehule wrote: > it is expected behave? > > 1.session > > postgres=# begin; > BEGIN > postgres=# lock oo IN ACCESS EXCLUSIVE MODE; > LOCK TABLE > > 2. session > > postgres=# select * from oo for update nowait; > > hangs forever NOWAIT is a

Re: [HACKERS] NOWAIT doesn't work

2012-10-31 Thread Pavel Stehule
tested on 9.3 Pavel 2012/10/31 Pavel Stehule : > Hello > > it is expected behave? > > 1.session > > postgres=# begin; > BEGIN > postgres=# lock oo IN ACCESS EXCLUSIVE MODE; > LOCK TABLE > > 2. session > > postgres=# select * from oo for update nowait; > > hangs forever > > Regards > > Pavel