Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita4ef032

Browse files
committed
Emit log when restore_command succeeds but archived file faills to be restored.
Previously, when restore_command claimed to succeed but failed to restorethe file with the right name, for example, due to mis-configuration ofrestore_command, no log message was reported. Then the recovery failedlater with an error message not directly related to the issue.This commit changes the recovery so that a log message is emitted inthis error case. This would enable us to investigate what happened inthis case more easily.Author: Jeff Janes, Fujii MasaoReviewed-by: Pavel Borisov, Kyotaro HoriguchiDiscussion:https://postgr.es/m/CAMkU=1xkFs3Omp4JR4wMYWdam_KLuj6LXnTYfU8u3T0h=PLLMQ@mail.gmail.com
1 parent49407dc commita4ef032

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎src/backend/access/transam/xlogarchive.c‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,12 @@ RestoreArchivedFile(char *path, const char *xlogfname,
220220
else
221221
{
222222
/* stat failed */
223-
if (errno!=ENOENT)
224-
ereport(FATAL,
225-
(errcode_for_file_access(),
226-
errmsg("could not stat file \"%s\": %m",
227-
xlogpath)));
223+
intelevel= (errno==ENOENT) ?LOG :FATAL;
224+
225+
ereport(elevel,
226+
(errcode_for_file_access(),
227+
errmsg("could not stat file \"%s\": %m",xlogpath),
228+
errdetail("restore_command returned a zero exit status, but stat() failed.")));
228229
}
229230
}
230231

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp