Re: [GENERAL] Duplicate key issue in a transaction block

2009-06-09 Thread Ioana Danes
oana --- On Mon, 6/8/09, Ioana Danes wrote: > From: Ioana Danes > Subject: Re: [GENERAL] Duplicate key issue in a transaction block > To: "Scott Marlowe" > Cc: "Bill Moran" , "Vyacheslav Kalinin" > , "PostgreSQL General" > Receiv

Re: [GENERAL] Duplicate key issue in a transaction block

2009-06-08 Thread Ioana Danes
wrote: > From: Scott Marlowe > Subject: Re: [GENERAL] Duplicate key issue in a transaction block > To: "Ioana Danes" > Cc: "Bill Moran" , "Vyacheslav Kalinin" > , "PostgreSQL General" > Received: Monday, June 8, 2009, 2:37 PM > On Mon, Jun 8

Re: [GENERAL] Duplicate key issue in a transaction block

2009-06-08 Thread Scott Marlowe
On Mon, Jun 8, 2009 at 12:25 PM, Ioana Danes wrote: > > Well, I guess I have my answer... > > I tried to narrow down an issue I get on one of the production sites, where > using a similar transaction I get the same error. > > In my production environment the group id is actually a unique number fo

Re: [GENERAL] Duplicate key issue in a transaction block

2009-06-08 Thread Ioana Danes
Well, I guess I have my answer... I tried to narrow down an issue I get on one of the production sites, where using a similar transaction I get the same error. In my production environment the group id is actually a unique number for the terminal (terminalid) and the same transaction CANNOT be

Re: [GENERAL] Duplicate key issue in a transaction block

2009-06-08 Thread Bill Moran
In response to Vyacheslav Kalinin : > On Mon, Jun 8, 2009 at 8:33 PM, Bill Moran wrote: > > > > > Perhaps you want to take an exclusive lock on the table? The operation > > you describe seems to suggest that you'd want to guarantee exclusive > > write access to the table. > > Exclusive table l

Re: [GENERAL] Duplicate key issue in a transaction block

2009-06-08 Thread Ioana Danes
--- On Mon, 6/8/09, Bill Moran wrote: > From: Bill Moran > Subject: Re: [GENERAL] Duplicate key issue in a transaction block > To: "Ioana Danes" > Cc: "PostgreSQL General" > Received: Monday, June 8, 2009, 12:33 PM > In response to Ioana Danes : > &

Re: [GENERAL] Duplicate key issue in a transaction block

2009-06-08 Thread Vyacheslav Kalinin
On Mon, Jun 8, 2009 at 8:33 PM, Bill Moran wrote: > > Perhaps you want to take an exclusive lock on the table? The operation > you describe seems to suggest that you'd want to guarantee exclusive > write access to the table. > Exclusive table lock is a bit excessive IMO. Locking particular gro

Re: [GENERAL] Duplicate key issue in a transaction block

2009-06-08 Thread Bill Moran
In response to Ioana Danes : > > Hi Everyone, > > I have a hard to reproduce scenario for a production siteI tried to > simplify the code and at the end I could get a similar problem with the > following table and java code. > The problem is that I have a transaction that deletes all the re

[GENERAL] Duplicate key issue in a transaction block

2009-06-08 Thread Ioana Danes
Hi Everyone, I have a hard to reproduce scenario for a production siteI tried to simplify the code and at the end I could get a similar problem with the following table and java code. The problem is that I have a transaction that deletes all the records in a group and inserts the new recor