Search Postgresql Archives

Re: Transaction isolation and constraints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cliff@xxxxxxxxxxxxx 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 insert rows
> that don't violate the constraint: will they be able to proceed in
> parallel?  Or will one wait for the other, because they both need to
> update the shared index?  I.e., does the mechanism work by waiting for
> one index update to commit before permitting the next?

They proceed in parallel.  Backends wait only on specific rows that
conflict, not the index page.

-- 
  Bruce Momjian  <bruce@xxxxxxxxxx>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux