Re: MERGE vs REPLACE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: MERGE vs REPLACE
Дата
Msg-id 6410.1132328075@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: MERGE vs REPLACE  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: MERGE vs REPLACE  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Oh, good point.  I was thinking just about concurrent MERGEs.  However,
> it is more complicated than that.  By definitaion you can not see
> changes from other transactions while your statement is being run (even
> if you increment CommandCounter), so to be atomic, you would still see
> the row even though some other transaction had deleted it.

We would have to use the same semantics we use now for read-committed
UPDATE, that is look at the latest version of the row even though this
would not normally be visible to the transaction's snapshot.

In the case of a serializable transaction, no doubt we should fail if
any concurrent change actually happens.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: someone working to add merge?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Improving count(*)