aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlogarchive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/transam/xlogarchive.c')
-rw-r--r--src/backend/access/transam/xlogarchive.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/backend/access/transam/xlogarchive.c b/src/backend/access/transam/xlogarchive.c
index cae93ab69dd..f39dc4ddf1a 100644
--- a/src/backend/access/transam/xlogarchive.c
+++ b/src/backend/access/transam/xlogarchive.c
@@ -220,11 +220,12 @@ RestoreArchivedFile(char *path, const char *xlogfname,
else
{
/* stat failed */
- if (errno != ENOENT)
- ereport(FATAL,
- (errcode_for_file_access(),
- errmsg("could not stat file \"%s\": %m",
- xlogpath)));
+ int elevel = (errno == ENOENT) ? LOG : FATAL;
+
+ ereport(elevel,
+ (errcode_for_file_access(),
+ errmsg("could not stat file \"%s\": %m", xlogpath),
+ errdetail("restore_command returned a zero exit status, but stat() failed.")));
}
}