Re: Remove custom redundant full page write description from GIN - Mailing list pgsql-hackers

From Kirill Reshke
Subject Re: Remove custom redundant full page write description from GIN
Date
Msg-id CALdSSPgKqeMGeeTL2b=QqyBvg5zXNFaH_SZ8DaC2B68sZTf5fw@mail.gmail.com
Whole thread Raw
In response to Re: Remove custom redundant full page write description from GIN  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Wed, 8 Oct 2025 at 10:14, Michael Paquier <michael@paquier.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

pgsql-hackers by date:

Previous
From: Nazir Bilal Yavuz
Date:
Subject: Re: Upgrade macOS CI image from Sonoma to Sequoia
Next
From: Robert Haas
Date:
Subject: Re: plan shape work