Re: GIN pageinspect support for entry tree and posting tree

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: GIN pageinspect support for entry tree and posting tree
Дата
Msg-id 921aa27c-e983-4577-b1dc-3adda3ce79da@eisentraut.org
обсуждение исходный текст
Ответ на Re: GIN pageinspect support for entry tree and posting tree  (Kirill Reshke <reshkekirill@gmail.com>)
Ответы Re: GIN pageinspect support for entry tree and posting tree
Список pgsql-hackers
On 06.01.26 17:44, Kirill Reshke wrote:
> On Tue, 6 Jan 2026 at 21:28, Kirill Reshke <reshkekirill@gmail.com> wrote:
>>
>> On Mon, 5 Jan 2026 at 13:39, Andrey Borodin <x4mmm@yandex-team.ru> wrote:
>>>
>>>
>>>
>>>> On 4 Jan 2026, at 00:25, Kirill Reshke <reshkekirill@gmail.com> wrote:
>>>>
>>>> PFA v6
>>>
>>> Would it be theoretically possible to unite functions for different GIN page types?
>>> e.g. merge gin_entrypage_items + gin_datapage_items -> gin_tree_items? Or is it an awkward API?
>>
>> For this, I borrowed this design from HASH and BRIN pageinspect
>> implementation. For them, we have one function-per-page-type. So,
>> maybe we can have dynamic schema here, but I don't see this as an
>> improvement to design.
>>
>> --
>> Best regards,
>> Kirill Reshke
> 
> CF bot did like trailing whitespace in regression output files,
> posting v8 with this issue fixed.

I noticed that the newly added C code could use a bit of modernization. 
See attached patch for some suggestions.  I only treated the new 
gin_entrypage_items(); the new gin_datapage_items() could use mostly the 
same changes.  One of the main changes is to push many local variables 
to smaller scopes.  Also some changes in ereport parentheses style, 
palloc style, some whitespace changes.  (The whole patch also needs 
pgindent treatment.)

Вложения

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