| От | Teodor Sigaev |
|---|---|
| Тема | SP-GiST bug and fix |
| Дата | |
| Msg-id | 5272723E.8070308@sigaev.ru обсуждение исходный текст |
| Ответы |
Re: SP-GiST bug and fix
|
| Список | pgsql-hackers |
SP-GiST has a bug during creation:
% create table ranges as select int4range( (random()*5)::int,
(random()*5)::int+5) as range
from generate_series(1,1000000) x;
% create index ranges_range_spgist_idx on ranges using spgist(range);
ERROR: unexpected spgdoinsert() failure
Bug is discovered by Jonathan S. Katz <jonathan.katz@excoventures.com>
When it was found deadlock possibility it was fixed by using
ConditionalLockBuffer() instead of LockBuffer(EXCLUSIVE) and retrying insertion
from the scratch. Build index method doesn't believe in concurrent access and
throws an error if ConditionalLockBuffer() fails. But I missed that
checkpointer process could take a share lock on buffer to write it on disk.
Attached patch just intoduces retrying during index creation.
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера