Re: Proposal to add page headers to SLRU pages

From: "Li, Yong" <yoli(at)ebay(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Bagga, Rishu" <bagrishu(at)amazon(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "Debnath, Shawn" <sdn(at)ebay(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, "Shyrabokau, Anton" <antons(at)ebay(dot)com>
Subject: Re: Proposal to add page headers to SLRU pages
Date: 2024-03-11 10:01:42
Message-ID: 51E39019-D805-4EB9-A814-EBC63C43223C@ebay.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> On Mar 9, 2024, at 05:22, Jeff Davis <pgsql(at)j-davis(dot)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 Content-Type Size
slru_page_header_v6.patch application/octet-stream 44.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-03-11 10:14:46 Re: Introduce XID age and inactive timeout based replication slot invalidation
Previous Message Stephen Frost 2024-03-11 10:00:32 Re: Statistics Import and Export