Re: BUG #19355: Attempt to insert data unexpectedly during concurrent update

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: BUG #19355: Attempt to insert data unexpectedly during concurrent update
Дата
Msg-id 868ff2a518820c8864b6d28510294b2457a126af.camel@cybertec.at
обсуждение исходный текст
Ответ на BUG #19355: Attempt to insert data unexpectedly during concurrent update  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On Mon, 2025-12-15 at 01:40 +0000, PG Bug reporting form wrote:
> Start two transaction and update on same tuple, raise concurrent update and
> evalplanqual.  It will be found out that the session with evalplanqual did
> not successfully update the data, but instead attempted to insert a row of
> data incorrectly.

I'd say that is expected.

If you need a guarantee that either INSERT or UPDATE succeed, you have to use
INSERT ... ON CONFLICT ... DO UPDATE

Yours,
Laurenz Albe



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