From: Michael Paquier Date: Mon, 2 Feb 2026 01:21:10 +0000 (+0900) Subject: Fix error message in RemoveWalSummaryIfOlderThan() X-Git-Tag: REL_17_8~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5995135f13031b37ad167ed83b5249ba8419ade2;p=thirdparty%2Fpostgresql.git Fix error message in RemoveWalSummaryIfOlderThan() A failing unlink() was reporting an incorrect error message, referring to stat(). Author: Man Zeng Reviewed-by: Junwang Zhao Discussion: https://postgr.es/m/tencent_3BBE865C5F49D452360FF190@qq.com Backpath-through: 17 --- diff --git a/src/backend/backup/walsummary.c b/src/backend/backup/walsummary.c index 322ae3c3ad1..14d74a70d05 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))); }