Re: Allow pg_archivecleanup to remove backup history files

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Allow pg_archivecleanup to remove backup history files
Дата
Msg-id ZHA+QuqIgKQVzUFV@paquier.xyz
обсуждение исходный текст
Ответ на Re: Allow pg_archivecleanup to remove backup history files  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Allow pg_archivecleanup to remove backup history files