On Fri, May 26, 2023 at 10:07:48AM +0900, Kyotaro Horiguchi wrote:
> +                     if (!IsXLogFileName(walfile) && 
> !IsPartialXLogFileName(walfile) &&
> +                             (!cleanBackupHistory || 
> !IsBackupHistoryFileName(walfile)))
> +                             continue;
> 
> I'm not certain about the others, but I see this a tad tricky to
> understand at first glance. Here's how I would phrase it. (A nearby
> comment might require a tweak if we go ahead with this change.)
> 
>               if (!(IsXLogFileName(walfile) || IsPartialXLogFileName(walfile) 
> ||
>                       (cleanBackupHistory && 
> IsBackupHistoryFileName(walfile))))
> or 
>               if (!IsXLogFileName(walfile) && !IsPartialXLogFileName(walfile) 
> &&
>                       !(cleanBackupHistory && 
> IsBackupHistoryFileName(walfile)))

FWIW, I am OK with what's written in the patch, but it is true that
your second suggestion makes things a bit easier to read, perhaps.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to