From: | Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Greg Smith <greg(at)2ndquadrant(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Boxuan Zhai <bxzhai2010(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid |
Date: | 2011-01-04 17:02:54 |
Message-ID: | 4D2352BE.7060706@cs.helsinki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2011-01-04 6:27 PM, David Fetter wrote:
> On Tue, Jan 04, 2011 at 04:44:32AM -0500, Greg Smith wrote:
>> Heikki Linnakangas wrote:
>>> You can of course LOCK TABLE as a work-around, if that's what you want.
>>
>> Presuming the code quality issues and other little quirks I've
>> documented (and new ones yet to be discovered) can get resolved
>> here, and that's a sizeable open question, I could see shipping this
>> with the automatic heavy LOCK TABLE in there. Then simple UPSERT
>> could work out of the box via a straightforward MERGE.
>
> How about implementing an UPSERT command as "take the lock, do the
> merge?" That way, we'd have both the simplicity for the simpler cases
> and a way to relax consistency guarantees for those who would like to
> do so.
That, unfortunately, won't work so well in REPEATABLE READ :-( But I,
too, am starting to think that we should have a separate, optimized
command to do UPSERT/INSERT .. IGNORE efficiently and correctly while
making MERGE's correctness the user's responsibility. Preferably with
huge warning signs on the documentation page.
Regards,
Marko Tiikkaja
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2011-01-04 17:09:45 | Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid |
Previous Message | David Fetter | 2011-01-04 17:02:26 | Re: ALTER EXTENSION UPGRADE patch v1 |