Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid - Mailing list pgsql-hackers

From Greg Smith
Subject Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid
Date
Msg-id 4D217286.1020400@2ndquadrant.com
Whole thread Raw
In response to Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid  (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>)
Responses Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid
List pgsql-hackers
Marko Tiikkaja wrote:
> I'm confused.  Are you saying that the patch is supposed to lock the 
> table against concurrent INSERT/UPDATE/DELETE/MERGE?  Because I don't 
> see it in the patch, and the symptoms you're having are a clear 
> indication of the fact that it's not happening.  I also seem to recall 
> that people thought locking the table would be excessive.

That's exactly what it should be doing.  I thought I'd seen just that in 
one of the versions of this patch, but maybe that's a mistaken memory on 
my part.  In advance of the planned but not available yet ability to 
lock individual index key values, locking the whole table is the only 
possible implementation that can work correctly here I'm aware of.  In 
earlier versions, I think this code was running into issues before it 
even got to there.  If you're right that things like the duplicate key 
error in the current version are caused exclusively by not locking 
enough, that may be the next necessary step here.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services and Support        www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Sync Rep Design
Next
From: Brar Piening
Date:
Subject: Visual Studio 2010/Windows SDK 7.1 support