Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5332b8c

Browse filesBrowse files
committed
Prevent the unnecessary creation of .ready file for the timeline history file.
Previously .ready file was created for the timeline history file at the end of an archive recovery even when WAL archiving was not enabled. This creation is unnecessary and causes .ready file to remain infinitely. This commit changes an archive recovery so that it creates .ready file for the timeline history file only when WAL archiving is enabled. Backpatch to all supported versions.
1 parent 2076db2 commit 5332b8c
Copy full SHA for 5332b8c

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed

‎src/backend/access/transam/timeline.c

Copy file name to clipboardExpand all lines: src/backend/access/transam/timeline.c
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <unistd.h>
3737

3838
#include "access/timeline.h"
39+
#include "access/xlog.h"
3940
#include "access/xlog_internal.h"
4041
#include "access/xlogdefs.h"
4142
#include "storage/fd.h"
@@ -437,8 +438,11 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
437438
#endif
438439

439440
/* The history file can be archived immediately. */
440-
TLHistoryFileName(histfname, newTLI);
441-
XLogArchiveNotify(histfname);
441+
if (XLogArchivingActive())
442+
{
443+
TLHistoryFileName(histfname, newTLI);
444+
XLogArchiveNotify(histfname);
445+
}
442446
}
443447

444448
/*

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.