Re: ask for review of MERGE

Поиск
Список
Период
Сортировка
Искать
От
Kevin Grittner
Тема
Re: ask for review of MERGE
Дата
Msg-id
4CC581280200002500036DC5@gw.wicourts.gov
Ответ на
Список
Дерево обсуждения
ask for review of MERGE Boxuan Zhai <bxzhai2010@gmail.com>
Re: ask for review of MERGE Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Re: ask for review of MERGE Boxuan Zhai <bxzhai2010@gmail.com>
Re: ask for review of MERGE Greg Smith <greg@2ndquadrant.com>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE Boxuan Zhai <bxzhai2010@gmail.com>
Re: ask for review of MERGE Greg Smith <greg@2ndquadrant.com>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE Boxuan Zhai <bxzhai2010@gmail.com>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE Greg Smith <greg@2ndquadrant.com>
Re: ask for review of MERGE Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>
Re: ask for review of MERGE Greg Smith <greg@2ndquadrant.com>
Re: ask for review of MERGE Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
Re: ask for review of MERGE Greg Smith <greg@2ndquadrant.com>
Re: ask for review of MERGE Tom Lane <tgl@sss.pgh.pa.us>
Re: ask for review of MERGE Greg Stark <gsstark@mit.edu>
Re: ask for review of MERGE Martijn van Oosterhout <kleptog@svana.org>
Re: ask for review of MERGE Greg Stark <gsstark@mit.edu>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE Greg Smith <greg@2ndquadrant.com>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE Greg Smith <greg@2ndquadrant.com>
Re: ask for review of MERGE Greg Stark <gsstark@mit.edu>
Re: ask for review of MERGE Greg Stark <gsstark@mit.edu>
Re: ask for review of MERGE "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: ask for review of MERGE Bruce Momjian <bruce@momjian.us>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: ask for review of MERGE Greg Stark <gsstark@mit.edu>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE Simon Riggs <simon@2ndQuadrant.com>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE Simon Riggs <simon@2ndQuadrant.com>
Re: ask for review of MERGE Josh Berkus <josh@agliodbs.com>
Re: ask for review of MERGE Greg Stark <gsstark@mit.edu>
Re: ask for review of MERGE Boxuan Zhai <bxzhai2010@gmail.com>
Re: ask for review of MERGE Boxuan Zhai <bxzhai2010@gmail.com>
Re: ask for review of MERGE Robert Haas <robertmhaas@gmail.com>
Re: ask for review of MERGE Greg Smith <greg@2ndquadrant.com>
Re: ask for review of MERGE Josh Kupershmidt <schmiddy@gmail.com>
Re: ask for review of MERGE Greg Smith <greg@2ndquadrant.com>
Re: ask for review of MERGE Thom Brown <thom@linux.com>
Greg Stark  wrote:
> Robert Haas  wrote:
>> But let's back up and talk about MVCC for a minute.  Suppose we
>> have three source tuples, (1), (2), and (3); and the target table
>> contains tuples (1) and (2), of which only (1) is visible to our
>> MVCC snapshot; suppose also an equijoin.  Clearly, source tuple
>> (1) should fire the MATCHED rule and source tuple (3) should fire
>> the NOT MATCHED rule, but what in the world should source tuple
>> (2) do?  AFAICS, the only sensible behavior is to throw a
>> serialization error, because no matter what you do the results
>> won't be equivalent to a serial execution of the transaction that
>> committed target tuple (2) and the transaction that contains the
>> MERGE.
> 
> So the behaviour we get with UPDATE in this situation is that we
> update (2) so I would expect this to execute the MATCHED rule.
Certainly that would be consistent with the behavior of READ
COMMITTED -- wait for commit or rollback of the concurrent
transaction, and then proceed with whatever data is there after
completion of the other transaction.  With REPEATABLE READ or
SERIALIZABLE you would block until commit of the other transaction
and terminate with a write conflict -- a form of serialization
failure.  If the other transaction rolls back you INSERT.
At least, that would be the least surprising behavior to me.
-Kevin

В списке pgsql-hackers по дате отправления
От: David E. Wheeler
Дата:
Сообщение: Re: add label to enum syntax
От: Robert Haas
Дата:
Сообщение: Re: ask for review of MERGE
FAQ