Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns

Поиск
Список
Период
Сортировка
От Alexander Lakhin
Тема Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns
Дата
Msg-id 92873f8d-a9b1-0ee8-5753-ee4a1664fb0e@gmail.com
обсуждение исходный текст
Ответ на BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
04.04.2023 16:00, PG Bug reporting form sent:
> The following bug has been logged on the website:
>
> Bug reference:      17884
>
> ...
>
> Here gist_page_items() tries to decode a tuple using a descriptor of the
> index (defining 3 columns), but in fact non-leaf page items contain no
> non-key data ...

Please look at the patch attached, that makes gist_page_items() process items
on leaf and non-leaf pages differently, accounting for their contents.
I've decided to move away from BuildIndexValueDescription(), but borrow some
of it's code, for two reasons:
that function outputs only key columns;
it checks permissions for a table/index, but this is not needed for pageinspect
(firstly, because a user already has all the data do decode;
secondly, because gist_page_items() requires a superuser role anyway).

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

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17930: Regression in DISABLE TRIGGER ALL
Следующее
От: Olivier Chédru
Дата:
Сообщение: Re: BUG #17930: Regression in DISABLE TRIGGER ALL