mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-03 06:07:18 +02:00
Add HINT for restartpoint race with KeepFileRestoredFromArchive().
The five commits ending at cc2c7d65fc
closed this race condition for v15+. For v14 through v10, add a HINT to
discourage studying the cosmetic problem.
Reviewed by Kyotaro Horiguchi and David Steele.
Discussion: https://postgr.es/m/20220731061747.GA3692882@rfd.leadboat.com
This commit is contained in:
parent
4ad4c1f419
commit
41f613fc25
@ -3392,7 +3392,10 @@ XLogFileInit(XLogSegNo logsegno, bool *use_existent, bool use_lock)
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode_for_file_access(),
|
(errcode_for_file_access(),
|
||||||
errmsg("could not open file \"%s\": %m", path)));
|
errmsg("could not open file \"%s\": %m", path),
|
||||||
|
(AmCheckpointerProcess() ?
|
||||||
|
errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
|
||||||
|
0)));
|
||||||
|
|
||||||
elog(DEBUG2, "done creating and filling new WAL file");
|
elog(DEBUG2, "done creating and filling new WAL file");
|
||||||
|
|
||||||
|
@ -748,7 +748,10 @@ durable_link_or_rename(const char *oldfile, const char *newfile, int elevel)
|
|||||||
ereport(elevel,
|
ereport(elevel,
|
||||||
(errcode_for_file_access(),
|
(errcode_for_file_access(),
|
||||||
errmsg("could not link file \"%s\" to \"%s\": %m",
|
errmsg("could not link file \"%s\" to \"%s\": %m",
|
||||||
oldfile, newfile)));
|
oldfile, newfile),
|
||||||
|
(AmCheckpointerProcess() ?
|
||||||
|
errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
|
||||||
|
0)));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
unlink(oldfile);
|
unlink(oldfile);
|
||||||
@ -759,7 +762,10 @@ durable_link_or_rename(const char *oldfile, const char *newfile, int elevel)
|
|||||||
ereport(elevel,
|
ereport(elevel,
|
||||||
(errcode_for_file_access(),
|
(errcode_for_file_access(),
|
||||||
errmsg("could not rename file \"%s\" to \"%s\": %m",
|
errmsg("could not rename file \"%s\" to \"%s\": %m",
|
||||||
oldfile, newfile)));
|
oldfile, newfile),
|
||||||
|
(AmCheckpointerProcess() ?
|
||||||
|
errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
|
||||||
|
0)));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user