summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2025-04-06 06:15:13 +0000
committerMichael Paquier2025-04-06 06:15:13 +0000
commite77d9cd4f52ec40ec9edc823ee89612ddf300795 (patch)
treefdce75427336fa81faa577392d9b0c9e330d6725
parentd0b6acaf04a2eac17bf1533fb2991ab08da4a1be (diff)
Revert "Add HINT for restartpoint race with KeepFileRestoredFromArchive()."
This reverts commit 8ad6c5dbbe5a, which was a commit specific to v14 and older branches as the race condition between restartpoints and KeepFileRestoredFromArchive() still existed. 1f95181b44c8 has worsened the situation on these two branches, causing spurious failures in archive recovery (neither streaming nor archive recovery) with concurrent restartpoints. The same logic as v15 and newer versions will be applied in some follow-up commits to close this problem, making this HINT not necessary anymore. Reported-by: Arun Thirupathi Discussion: https://postgr.es/m/20250306193013.36.nmisch@google.com Backpatch-through: 13
-rw-r--r--src/backend/access/transam/xlog.c5
-rw-r--r--src/backend/storage/file/fd.c10
2 files changed, 3 insertions, 12 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 6fbb5328fd0..4ef417f1edd 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -3423,10 +3423,7 @@ XLogFileInit(XLogSegNo logsegno, bool *added)
if (fd < 0)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not open file \"%s\": %m", path),
- (AmCheckpointerProcess() ?
- errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
- 0)));
+ errmsg("could not open file \"%s\": %m", path)));
elog(DEBUG2, "done creating and filling new WAL file");
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 452ab88cafa..7aa50a5d2e5 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -800,10 +800,7 @@ durable_rename_excl(const char *oldfile, const char *newfile, int elevel)
ereport(elevel,
(errcode_for_file_access(),
errmsg("could not link file \"%s\" to \"%s\": %m",
- oldfile, newfile),
- (AmCheckpointerProcess() ?
- errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
- 0)));
+ oldfile, newfile)));
return -1;
}
unlink(oldfile);
@@ -813,10 +810,7 @@ durable_rename_excl(const char *oldfile, const char *newfile, int elevel)
ereport(elevel,
(errcode_for_file_access(),
errmsg("could not rename file \"%s\" to \"%s\": %m",
- oldfile, newfile),
- (AmCheckpointerProcess() ?
- errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
- 0)));
+ oldfile, newfile)));
return -1;
}
#endif