]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix error message in RemoveWalSummaryIfOlderThan()
authorMichael Paquier <michael@paquier.xyz>
Mon, 2 Feb 2026 01:21:04 +0000 (10:21 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 2 Feb 2026 01:21:04 +0000 (10:21 +0900)
A failing unlink() was reporting an incorrect error message, referring
to stat().

Author: Man Zeng <zengman@halodbtech.com>
Reviewed-by: Junwang Zhao <zhjwpku@gmail.com>
Discussion: https://postgr.es/m/tencent_3BBE865C5F49D452360FF190@qq.com
Backpath-through: 17

src/backend/backup/walsummary.c

index 21164faac7ea72c7c97f5d9752f87ab26bb3ba91..4ee510092f997f460c39e9ce9f7a5cf3135924a4 100644 (file)
@@ -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)));
 }