Re: [HACKERS] Deadlock error in INSERT statements

2009-10-07 Thread Csaba Nagy
On Wed, 2009-10-07 at 16:34 +0200, Gnanam wrote: > NOTE: I've seen "deadlock" errors in UPDATE statement but why it is throwing > in INSERT statements. It is because of the foreign key. Inserting a child row will lock the corresponding parent row, and if you insert multiple rows with different par

Re: [HACKERS] Deadlock error in INSERT statements

2009-10-07 Thread Robert Haas
On Wed, Oct 7, 2009 at 10:34 AM, Gnanam wrote: > > Hi, > > We've a web-based application. > We are trying to do concurrency testing, Three person doing same operation > on different data. > > I'm facing the following deadlock error thrown by PostgreSQL: > > org.postgresql.util.PSQLException: ERROR

[HACKERS] Deadlock error in INSERT statements

2009-10-07 Thread Gnanam
Hi, We've a web-based application. We are trying to do concurrency testing, Three person doing same operation on different data. I'm facing the following deadlock error thrown by PostgreSQL: org.postgresql.util.PSQLException: ERROR: deadlock detected Detail: Process 13560 waits for ShareLock