mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +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
0ef754cad7
commit
38eb5d9e86
@ -4877,8 +4877,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);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user