Re: [GENERAL] Transaction isolation and constraints

2007-12-15 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > Hi, Tom: > > >Whichever one manages to get to the index page first will go through. > >The second one will block waiting to see if the first one commits, > >and will error out if so --- or proceed, if it aborts. > > I see, this makes sense. What if the two transactions

Re: [GENERAL] Transaction isolation and constraints

2007-12-06 Thread cliff
Hi, Tom: >Whichever one manages to get to the index page first will go through. >The second one will block waiting to see if the first one commits, >and will error out if so --- or proceed, if it aborts. I see, this makes sense. What if the two transactions insert rows that don't violate the con

Re: [GENERAL] Transaction isolation and constraints

2007-12-04 Thread Tom Lane
[EMAIL PROTECTED] writes: > suppose a table has a UNIQUE constraint on a column, and two > concurrent transactions attempt to INSERT a row with the same value > for that column: Whichever one manages to get to the index page first will go through. The second one will block waiting to see if the fi