Re: [PATCH] Fix error message in RemoveWalSummaryIfOlderThan to indicate file removal failure

Поиск
Список
Период
Сортировка
От Junwang Zhao
Тема Re: [PATCH] Fix error message in RemoveWalSummaryIfOlderThan to indicate file removal failure
Дата
Msg-id CAEG8a3+50R5_eGF+oNV7P--DCHKde93YJU6i8x5ssF7xTqqKbw@mail.gmail.com
обсуждение исходный текст
Ответ на [PATCH] Fix error message in RemoveWalSummaryIfOlderThan to indicate file removal failure  ("zengman" <zengman@halodbtech.com>)
Ответы Re: [PATCH] Fix error message in RemoveWalSummaryIfOlderThan to indicate file removal failure
Список pgsql-hackers
On Sun, Feb 1, 2026 at 10:43 PM zengman <zengman@halodbtech.com> wrote:
>
> Hi all,
>
> I noticed a small issue. In `RemoveWalSummaryIfOlderThan`,an `unlink()` failure incorrectly logs "could not stat
file",likely a copy-paste error. 
> I updated it to "could not remove file". No functional changes.
>
> ```
> diff --git a/src/backend/backup/walsummary.c b/src/backend/backup/walsummary.c
> index 21164faac7e..4ee510092f9 100644
> --- a/src/backend/backup/walsummary.c
> +++ b/src/backend/backup/walsummary.c
> @@ -251,7 +251,7 @@ RemoveWalSummaryIfOlderThan(WalSummaryFile *ws, time_t cutoff_time)
>         if (unlink(path) != 0)
>                 ereport(ERROR,
>                                 (errcode_for_file_access(),
> -                                errmsg("could not stat file \"%s\": %m", path)));
> +                                errmsg("could not remove file \"%s\": %m", path)));
>         ereport(DEBUG2,
>                         (errmsg_internal("removing file \"%s\"", path)));
>  }
> ```
>
> --
> regards,
> Man Zeng

Agreed, that was likely due to a copy-paste oversight.

--
Regards
Junwang Zhao



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