Re: pageinspect support for SpGiST

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pageinspect support for SpGiST
Date: 2026-02-27 13:03:06
Message-ID: 6C351305-0772-45B3-9217-E60B5DB5F2B1@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 11 Jan 2026, at 16:32, Kirill Reshke <reshkekirill(at)gmail(dot)com> wrote:
>
> PFA v2

Nice feature, it would be good to have in. Some nits:

1. File header is wrong — says "gistfuncs.c" and "GiST"
2. Traces of GiST are everywhere, in function names, in error messages, etc
3. spgist_metapage_items — wrong errdetail for magic number check ("Expected special size")
4. "values[6] = InvalidTransactionId;" more conventional would be "TransactionIdGetDatum(InvalidTransactionId)"
5. spgist_innerpage_items — has_datums used uninitialized in SPGIST_DEAD+ cases
6. spgist_innerpage_items — doesn't output prefix/node data, is it by design?
7. you use index_deform_tuple_internal() instead of spgDeformLeafTuple(), I'm not sure that's conventional also
8. "values[2] = UInt32GetDatum(leafTuple->size);" must be "values[2] = UInt16GetDatum(leafTuple->size);" according to "OUT size smallint,"?
9. "OUT blkno smallint," also raises sizing questions

Thanks for working on this!

Best regards, Andrey Borodin.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2026-02-27 13:38:36 Re: centralize CPU feature detection
Previous Message Tender Wang 2026-02-27 12:54:06 Re: MERGE behavior with REPEATABLE READ isolation level