diff options
author | Noah Misch <noah@leadboat.com> | 2022-08-05 08:30:58 -0700 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2022-08-05 08:31:01 -0700 |
commit | ad8ebcfe9662c6145342f6f02ad7c46108f135b9 (patch) | |
tree | 5d8911e632e90065be8b4d7b519759e82ce64fe7 /src/backend/access/transam/xlog.c | |
parent | d2a74621ed0430094e6d1f754df5bc1647408be7 (diff) | |
download | postgresql-ad8ebcfe9662c6145342f6f02ad7c46108f135b9.tar.gz postgresql-ad8ebcfe9662c6145342f6f02ad7c46108f135b9.zip |
Add HINT for restartpoint race with KeepFileRestoredFromArchive().
The five commits ending at cc2c7d65fc27e877c9f407587b0b92d46cd6dd16
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
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index b9c130bcccb..29e94f3102a 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -3436,7 +3436,10 @@ XLogFileInit(XLogSegNo logsegno, bool *use_existent, bool use_lock) if (fd < 0) ereport(ERROR, (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"); |