Samuel Neff <[EMAIL PROTECTED]>
wrote:
> using BEGIN IMMEDIATE would prevent this situation from happening,
> right?
Not in all cases. BEGIN IMMEDIATE acquires a RESERVED lock, which
doesn't prevent another connection from acquiring a SHARED lock. The
writer may still be unable to promote to EXC
using BEGIN IMMEDIATE would prevent this situation from happening, right?
Process 2 would get the lock error when it tries to begin the transaction
and thus never obtain a reserved lock which prevented process 1 from
promoting to an exclusive lock for commit.
Sam
-
Dave Dyer <[EMAIL PROTECTED]> wrote:
> I don't understand why the following transaction
> behavior is correct or necessary. The question
> involves two simultaneous transactions on the same
> database
>
> Process 1 Process 2
>
> BEGIN
>
> BEGIN
>
> insert...
>
> insert... fails "locked"
>
> end al
I don't understand why the following transaction
behavior is correct or necessary. The question
involves two simultaneous transactions on the same
database
Process 1 Process 2
BEGIN
BEGIN
insert...
insert... fails
4 matches
Mail list logo