| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
|---|---|
| To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Cc: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Roman Khapov <rkhapov(at)yandex-team(dot)ru> |
| Subject: | Re: GIN pageinspect support for entry tree and posting tree |
| Date: | 2026-01-07 20:13:16 |
| Message-ID: | CALdSSPjgPq1O2-mL4ED1HOtLMe4P_4uB0E7=eLriCuD5cwzuHg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, 7 Jan 2026 at 21:41, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> On 06.01.26 17:44, Kirill Reshke wrote:
> > On Tue, 6 Jan 2026 at 21:28, Kirill Reshke <reshkekirill(at)gmail(dot)com> wrote:
> >>
> >> On Mon, 5 Jan 2026 at 13:39, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
> >>>
> >>>
> >>>
> >>>> On 4 Jan 2026, at 00:25, Kirill Reshke <reshkekirill(at)gmail(dot)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.)
Hi!
Thank you. I included your changes in v9, and also did a similar
cleanup in gin_datapage_items().
For pg_ident run sake, and for general benefit, there is also v9-0001
which does cleanups similar to your changes for already-existing
functions
like gin_leafpage_items etc.
--
Best regards,
Kirill Reshke
| Attachment | Content-Type | Size |
|---|---|---|
| v9-0002-GIN-pageinspect-support-for-entry-tree-and-postin.patch | application/octet-stream | 29.7 KB |
| v9-0001-Prelimitary-cleaunup.patch | application/octet-stream | 8.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2026-01-07 20:18:21 | Re: pg_upgrade: optimize replication slot caught-up check |
| Previous Message | Nathan Bossart | 2026-01-07 19:46:36 | Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers |