Re: [PATCH] Share WAL summary filtering logic

From: Ontowhee <ontowhee(at)gmail(dot)com>
To: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Subject: Re: [PATCH] Share WAL summary filtering logic
Date: 2026-12-03 08:37:47
Message-ID: CADOSWVK6s0Cpp8ZWSOGJeqe62W6KZ9NPQXUO-nWKsLRr5g5+wQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 3, 2026 at 12:18 AM Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
wrote:

> Hi,
>
> In the thread about incremental backups after a timeline switch [1],
> Fujii-san suggested sharing the filtering logic between GetWalSummaries()
> and FilterWalSummaries() for v20.
>
> Since f549ecd2660, both functions make the same timeline and LSN checks.
> The attached patch puts those checks in one place (atleast it will make
> sure we do not diverge again).
>
> Thoughts?
>
> [1]
> https://postgr.es/m/CAHGQGwHgE=cC6K-jQzD4EtE5n_GPSGFOt3G3JAEiZggAyA1jTA@mail.gmail.com
>
> Regards,
> Ayush
>

Hello Ayush,

I took a look at the patch. Overall it looks good.

From what I understand, in f549ecd2660 the filter criteria for
FilterWalSummaries()
was updated to be the same as that in GetWalSummaries(), and this patch
refactors
the logic so the code is shared between the two functions. It also cleans
up 3
variables (file_tli, file_start_lsn, file_end_lsn) by replacing them with
the existing
struct WalSummaryFile.

No tests were added for the change in f549ecd2660. Would it help to add
tests here?

I hope this review is helpful.

Thank you,
Lilian

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Jim Jones 2026-12-03 08:26:53 DROP OWNED fails when the owner and a grantee of a default ACL are listed together