Skip to content

Commit 5332b8c

Browse 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

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/backend/access/transam/timeline.c

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy