[BUG?] check_exclusion_or_unique_constraint false negative

Поиск
Список
Период
Сортировка
От Michail Nikolaev
Тема [BUG?] check_exclusion_or_unique_constraint false negative
Дата
Msg-id CANtu0oiktqQ2pwExoXqDpByXNCJa-KE5vQRodTRnmFHN_+qwHg@mail.gmail.com
обсуждение исходный текст
Ответы Re: [BUG?] check_exclusion_or_unique_constraint false negative
Список pgsql-hackers
Hello, everyone!

While reviewing [1], I noticed that check_exclusion_or_unique_constraint occasionally returns false negatives for btree unique indexes during UPSERT operations.
Although this doesn't cause any real issues with INSERT ON CONFLICT, I wanted to bring it to your attention, as it might indicate an underlying problem.

Attached is a patch to reproduce the issue.

make -C src/test/modules/test_misc/ check PROVE_TESTS='t/006_*'
....
   Failed test 'concurrent INSERTs status (got 2 vs expected 0)'
#   at t/006_concurrently_unique_fail.pl line 26.

#   Failed test 'concurrent INSERTs stderr /(?^:^$)/'
#   at t/006_concurrently_unique_fail.pl line 26.
#                   'pgbench: error: client 34 script 0 aborted in command 0 query 0: ERROR:  we know 31337 in the index!

Best regards,
Mikhail,

Вложения

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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: race condition in pg_class
Следующее
От: "Andrey M. Borodin"
Дата:
Сообщение: Re: Amcheck verification of GiST and GIN