1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-21 16:02:15 +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:
Fujii Masao
2014-11-06 21:25:45 +09:00
parent 45a607d5c7
commit 83c7bfb9ab

View File

@ -4492,9 +4492,12 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
#endif #endif
/* The history file can be archived immediately. */ /* The history file can be archived immediately. */
if (XLogArchivingActive())
{
TLHistoryFileName(histfname, newTLI); TLHistoryFileName(histfname, newTLI);
XLogArchiveNotify(histfname); XLogArchiveNotify(histfname);
} }
}
/* /*
* I/O routines for pg_control * I/O routines for pg_control