Re: Duplicate key issue in a transaction block - Mailing list pgsql-general

From Bill Moran
Subject Re: Duplicate key issue in a transaction block
Date
Msg-id 20090608135110.8cc40aa3.wmoran@potentialtech.com
Whole thread Raw
In response to Re: Duplicate key issue in a transaction block  (Vyacheslav Kalinin <vka@mgcp.com>)
List pgsql-general
In response to Vyacheslav Kalinin <vka@mgcp.com>:

> On Mon, Jun 8, 2009 at 8:33 PM, Bill Moran <wmoran@potentialtech.com> 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 group
> should be good, though it is not quite straightforward to achieve. I'd use
> advisory locks or would lock a row in a parent group table (if such table
> exists, if not - it might be worth to make one) referenced by rows in
> question.

Perhaps, but sounds like a lot of unnecessary complexity to me.

... and I didn't say exclusive table lock, I said "exclusive write"  Big
difference there.

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Any way to bring up a PG instance with corrupted data in it?
Next
From: Tom Lane
Date:
Subject: Re: Postgres's Performance degrades after heavy db operation