New addition to the merge sql standard

Поиск
Список
Период
Сортировка
От Nick DeCoursin
Тема New addition to the merge sql standard
Дата
Msg-id CAAbvdHnipKTeAZsQ0Q2ytSSxPemPFDDOaMRyO-wmxL+MBN=rpw@mail.gmail.com
обсуждение исходный текст
Ответы Re: New addition to the merge sql standard
Список pgsql-general
Dear Postgres Administrators,

There was a great article of `merge` by Lukas Fittl here: https://pganalyze.com/blog/5mins-postgres-15-merge-vs-insert-on-conflict

In his article, he highlights one of the severe disadvantages to merge:

The comment that he essentially made is that the downside of MERGE's handling of concurrency is that when you concurrently INSERT, so at the same time as you're executing the MERGE statement, there is another INSERT going on, then MERGE might not notice that. MERGE would go into its INSERT logic, and then it would get a unique violation.

This means that any individual row insert during the insert logic of the merge query can cause a unique violation and tank the entire merge query.


In my opinion, it would be better for merge to offer the functionality to simply ignore the rows that cause unique violation exceptions instead of tanking the whole query.

Thank you,
Nick

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: db size difference on primary and standby
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: New addition to the merge sql standard