Skip to content

Commit 47d2d29

Browse files
committed
Revert "Add HINT for restartpoint race with KeepFileRestoredFromArchive()."
This reverts commit 8ad6c5d, which was a commit specific to v14 and older branches as the race condition between restartpoints and KeepFileRestoredFromArchive() still existed. 1f95181 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
1 parent b494640 commit 47d2d29

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3468,10 +3468,7 @@ XLogFileInit(XLogSegNo logsegno, bool *added)
34683468
if (fd < 0)
34693469
ereport(ERROR,
34703470
(errcode_for_file_access(),
3471-
errmsg("could not open file \"%s\": %m", path),
3472-
(AmCheckpointerProcess() ?
3473-
errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
3474-
0)));
3471+
errmsg("could not open file \"%s\": %m", path)));
34753472

34763473
elog(DEBUG2, "done creating and filling new WAL file");
34773474

src/backend/storage/file/fd.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -834,10 +834,7 @@ durable_rename_excl(const char *oldfile, const char *newfile, int elevel)
834834
ereport(elevel,
835835
(errcode_for_file_access(),
836836
errmsg("could not link file \"%s\" to \"%s\": %m",
837-
oldfile, newfile),
838-
(AmCheckpointerProcess() ?
839-
errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
840-
0)));
837+
oldfile, newfile)));
841838
return -1;
842839
}
843840
unlink(oldfile);
@@ -847,10 +844,7 @@ durable_rename_excl(const char *oldfile, const char *newfile, int elevel)
847844
ereport(elevel,
848845
(errcode_for_file_access(),
849846
errmsg("could not rename file \"%s\" to \"%s\": %m",
850-
oldfile, newfile),
851-
(AmCheckpointerProcess() ?
852-
errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
853-
0)));
847+
oldfile, newfile)));
854848
return -1;
855849
}
856850
#endif

0 commit comments

Comments
 (0)