SKIP LOCKED assert triggered

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема SKIP LOCKED assert triggered
Дата
Msg-id CANbhV-FeEwMnN8yuMyss7if1ZKjOKfjcgqB26n8pqu1e=q0ebg@mail.gmail.com
обсуждение исходный текст
Ответы Re: SKIP LOCKED assert triggered  ("Bossart, Nathan" <bossartn@amazon.com>)
Список pgsql-hackers
The combination of these two statements in a transaction hits an
Assert in heapam.c at line 4770 on REL_14_STABLE

BEGIN;
SELECT * FROM queue LIMIT 1 FOR UPDATE SKIP LOCKED;
...
UPDATE queue SET status = 'UPDATED' WHERE id = :id;
COMMIT;

pgbench reliably finds this, running from inside a PL/pgSQL function.

Alvaro suggests we just ignore the Assert, which on testing appears to
be the right approach. Patch attached, which solves it for me.

There is no formal test that does lock then update, so I have
attempted to create one, but this has not successfully reproduced it
(attached anyway), but this code is different from the pgbench test.

-- 
Simon Riggs                http://www.EnterpriseDB.com/

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] postgres_fdw: suppress explicit casts in text:text comparisons (was: column option to override foreign types)
Следующее
От: Fabrice Chapuis
Дата:
Сообщение: Re: Logical replication timeout problem