Re: Yet another fast GiST build

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: Yet another fast GiST build
Дата
Msg-id 3B95DE5B-E376-45F7-BF7B-5BF53D99C7E8@yandex-team.ru
обсуждение исходный текст
Ответ на Re: Yet another fast GiST build  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers

> 15 янв. 2021 г., в 10:24, Peter Eisentraut <peter.eisentraut@enterprisedb.com> написал(а):
>
> I noticed this patch while working on another patch for pageinspect [0], and this one appears to introduce a problem
similarto the one the other patch attempts to fix: The "itemlen" output parameters are declared to be of type smallint,
butthe underlying C data is of type uint16 (OffsetNumber).  I don't know the details of gist enough to determine
whetheroverflow is possible here.  If not, perhaps a check or at least a comment would be useful.  Otherwise, these
parametersshould be of type int in SQL. 

Item offsets cannot exceed maximum block size of 32768. And even 32768/sizeof(ItemId). Thus overflow is impossible.
Interesting question is wether pageinspect should protect itself from corrupted input?
Generating description from bogus tuple, probably, can go wrong.

Best regards, Andrey Borodin.


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: WIP: System Versioned Temporal Table
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: PG vs LLVM 12 on seawasp, next round