mirror of
https://github.com/postgres/postgres.git
synced 2025-05-18 17:41:14 +03:00
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.
This commit is contained in:
parent
0247935c7b
commit
3a3b7e316f
@ -36,6 +36,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "access/timeline.h"
|
#include "access/timeline.h"
|
||||||
|
#include "access/xlog.h"
|
||||||
#include "access/xlog_internal.h"
|
#include "access/xlog_internal.h"
|
||||||
#include "access/xlogdefs.h"
|
#include "access/xlogdefs.h"
|
||||||
#include "storage/fd.h"
|
#include "storage/fd.h"
|
||||||
@ -437,8 +438,11 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The history file can be archived immediately. */
|
/* The history file can be archived immediately. */
|
||||||
TLHistoryFileName(histfname, newTLI);
|
if (XLogArchivingActive())
|
||||||
XLogArchiveNotify(histfname);
|
{
|
||||||
|
TLHistoryFileName(histfname, newTLI);
|
||||||
|
XLogArchiveNotify(histfname);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user