Re: Remove custom redundant full page write description from GIN

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Remove custom redundant full page write description from GIN
Date: 2025-10-09 12:33:54
Message-ID: CALdSSPgKqeMGeeTL2b=QqyBvg5zXNFaH_SZ8DaC2B68sZTf5fw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 8 Oct 2025 at 10:14, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Tue, Oct 07, 2025 at 02:08:02PM +0500, Kirill Reshke wrote:
> > Turns out we already use XLogRecGetData in assignment: char *rec =
> > XLogRecGetData(record). But I still did alter v2 patch a bit,
> > introducing new variable xlrec, to avoid clunky casts between char *
> > and ginxlogUpdateMeta.
>
> For UPDATE_META_PAGE, ntuples == 0 could also mean that we may show
> a lot of invalid block numbers, as well, which feels a bit pointless.
> I have switched that to check InvalidBlockNumber instead.

Thank you for pushing!

> While reviewing the whole, I have noticed that rightlink was missing
> for INSERT_LISTPAGE, as well as the right/left children pages for
> SPLIT. I have added this information, applied the result. Thanks!

After this change, I was wondering what is the purpose of
leftChildBlkno/rightChildBlkno fields of SPLIT record.
Turns out all of ginxlogSplit's fields except flags are of no use.
Should we remove them, reducing overall cognitive complexity of GIN
internals and reducing WAL footprint?

PFA patch for that. If this topic is too out-of-scope of this thread,
I can start another one, just let me know.

--
Best regards,
Kirill Reshke

Attachment Content-Type Size
v1-0001-Remove-all-fields-from-ginxlogSplit-except-flags.patch application/octet-stream 2.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2025-10-09 12:34:56 Re: plan shape work
Previous Message Nazir Bilal Yavuz 2025-10-09 12:30:20 Re: Upgrade macOS CI image from Sonoma to Sequoia