Re: BUG #17950: Incorrect memory access in gtsvector_picksplit()

Поиск
Список
Период
Сортировка
От Alexander Lakhin
Тема Re: BUG #17950: Incorrect memory access in gtsvector_picksplit()
Дата
Msg-id e2f36991-0519-bfcf-1da9-c31ca645b4ec@gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17950: Incorrect memory access in gtsvector_picksplit()  (Alexander Lakhin <exclusion@gmail.com>)
Ответы Re: BUG #17950: Incorrect memory access in gtsvector_picksplit()
Список pgsql-bugs
17.06.2023 17:00, Alexander Lakhin wrote:
> 29.05.2023 23:00, PG Bug reporting form wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference:      17950
>
> I managed to reduce the reproducer to the following:
> CREATE TABLE tst(t tsvector);
> INSERT INTO tst SELECT array_to_string(array(SELECT 'a' || x::text FROM generate_series(1, 125) x), ' ')::tsvector 
> FROM generate_series(1, 3000);
> INSERT INTO tst SELECT '' FROM generate_series(1, 100);
> CREATE INDEX gistidx ON tst USING gist (t tsvector_ops(siglen=1));
>
>
> A trivial fix for the issue is attached.
>

I can also propose a regression test addition that demonstrates the valgrind
complaint and also the output of gtsvectorout() for the case ISALLTRUE and
the opposite.

This addition increases the duration of `make check -C contrib/pageinspect`
under valgrind by 7-8 seconds for me:
ok 5         - gist                                     2496 ms
->
ok 5         - gist                                     9890 ms

In absence of any objections or other propositions, I'm inclined to register
this bugfix on the commitfest.

Best regards,
Alexander
Вложения

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

Предыдущее
От: Sandeep Thakkar
Дата:
Сообщение: Re: BUG #18040: PostgreSQL does not report its version correctly
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17950: Incorrect memory access in gtsvector_picksplit()