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.
#endif
/* The history file can be archived immediately. */
- TLHistoryFileName(histfname, newTLI);
- XLogArchiveNotify(histfname);
+ if (XLogArchivingActive())
+ {
+ TLHistoryFileName(histfname, newTLI);
+ XLogArchiveNotify(histfname);
+ }
}
/*