diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index e9746f4b177..e3492a93904 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -4492,8 +4492,11 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI, #endif /* The history file can be archived immediately. */ - TLHistoryFileName(histfname, newTLI); - XLogArchiveNotify(histfname); + if (XLogArchivingActive()) + { + TLHistoryFileName(histfname, newTLI); + XLogArchiveNotify(histfname); + } } /*