Re: Proposal to add page headers to SLRU pages - Mailing list pgsql-hackers

From Li, Yong
Subject Re: Proposal to add page headers to SLRU pages
Date
Msg-id 51E39019-D805-4EB9-A814-EBC63C43223C@ebay.com
Whole thread Raw
In response to Re: Proposal to add page headers to SLRU pages  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Proposal to add page headers to SLRU pages
List pgsql-hackers
> On Mar 9, 2024, at 05:22, Jeff Davis <pgsql@j-davis.com> wrote:
> 
> External Email
> 
> On Wed, 2024-03-06 at 12:01 +0000, Li, Yong wrote:
>> Rebase the patch against the latest HEAD.
> 
> The upgrade logic could use more comments explaining what's going on
> and why. As I understand it, it's a one-time conversion that needs to
> happen between 16 and 17. Is that right?
> 
> Regards,
>        Jeff Davis
> 

> In the new code we effectively store only one LSN per page, which I
> understand is strictly worse.  Maybe the idea of doing away with these
> LSN groups should be reconsidered ... unless I completely misunderstand
> the whole thing.
> 
> --
> Álvaro Herrera         PostgreSQL Developer  —


Thanks for the comments on LSN groups and pg_upgrade.

I have updated the patch to address both comments:
- The clog LSN group has been brought back.
  Now the page LSN on each clog page is used for honoring the write-ahead rule
  and it is always the highest LSN of all the LSN groups on the page.
  The LSN groups are used by TransactionIdGetStatus() as before.
- New comments have been added to pg_upgrade to mention the SLRU
  page header change as the reason for upgrading clog files.

Regards,
Yong
Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Statistics Import and Export
Next
From: Amit Kapila
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation