Re: BUG #14150: Attempted to delete invisible tuple

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: BUG #14150: Attempted to delete invisible tuple
Дата
Msg-id CAM3SWZR95WJDjLp9gCpuT+jdPon2i0oO8ju_jV+eJtGzLSJwQg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #14150: Attempted to delete invisible tuple  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-bugs
On Wed, Jul 6, 2016 at 5:22 PM, Peter Geoghegan <pg@heroku.com> wrote:
> The reason I doubted that it could be that simple was that it took
> this long to hear about this bug. It also took me a little while to
> produce a test case. I tended to doubt that all toast_delete() calls
> from heap_abort_speculative() are broken, since ISTM that they're not
> very rare in practice.
>
> I may have been wrong about that, though.

Looks like I was wrong about that. Attached simple patch forces the
implementation to see no conflict when the precheck is attempted in
the first iteration. It artificially forces a conflict. This causes
the regression tests to fail in one or two places, because an error is
raised in the INSERT path that would never have been reached otherwise
(e.g. there is a second almost equivalent unique that ON CONFLICT did
not infer).

These regression test failures are not interesting, though. What is
interesting is that the "attempted to delete invisible tuple" error
can be seen in a single interactive psql session once the patch is
applied. So, there is no race condition as such at all.

--
Peter Geoghegan

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: SELECT ... FOR UPDATE OF SKIP LOCKED returns can same row when table is filtered on different table than locked
Следующее
От: aouda.h@me.com
Дата:
Сообщение: BUG #14232: Possible mistake in the documentation