Skip to content

Commit e77d9cd

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 d0b6aca commit e77d9cd

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/backend/access/transam/xlog.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -3423,10 +3423,7 @@ XLogFileInit(XLogSegNo logsegno, bool *added)
34233423
if (fd < 0)
34243424
ereport(ERROR,
34253425
(errcode_for_file_access(),
3426-
errmsg("could not open file \"%s\": %m", path),
3427-
(AmCheckpointerProcess() ?
3428-
errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
3429-
0)));
3426+
errmsg("could not open file \"%s\": %m", path)));
34303427

34313428
elog(DEBUG2, "done creating and filling new WAL file");
34323429

src/backend/storage/file/fd.c

+2-8
Original file line numberDiff line numberDiff line change
@@ -800,10 +800,7 @@ durable_rename_excl(const char *oldfile, const char *newfile, int elevel)
800800
ereport(elevel,
801801
(errcode_for_file_access(),
802802
errmsg("could not link file \"%s\" to \"%s\": %m",
803-
oldfile, newfile),
804-
(AmCheckpointerProcess() ?
805-
errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
806-
0)));
803+
oldfile, newfile)));
807804
return -1;
808805
}
809806
unlink(oldfile);
@@ -813,10 +810,7 @@ durable_rename_excl(const char *oldfile, const char *newfile, int elevel)
813810
ereport(elevel,
814811
(errcode_for_file_access(),
815812
errmsg("could not rename file \"%s\" to \"%s\": %m",
816-
oldfile, newfile),
817-
(AmCheckpointerProcess() ?
818-
errhint("This is known to fail occasionally during archive recovery, where it is harmless.") :
819-
0)));
813+
oldfile, newfile)));
820814
return -1;
821815
}
822816
#endif

0 commit comments

Comments
 (0)