postgres.git / summary / log / commit / refs

commit    83c7bfb9aba947647dd2746281fceb60dd584271
Author:   Fujii Masao <fujii@postgresql.org>
Date:     Thu Nov 06 12:25:45 2014 +0000

    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.


src/backend/access/transam/xlog.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); + } } /* [parent: 45a607d5c7e7]