Hi,
Attached patch covers a case where TLI in the filename for a
record being read is different from where it belongs to. In other
words, it covers following case noted in StartupXLOG():
/*
* EndOfLogTLI is the TLI in the filename of the XLOG segment containing
* the end-of-log. It could be different from the timeline that EndOfLog
* nominally belongs to, if there was a timeline switch in that segment,
* and we were reading the old WAL from a segment belonging to a higher
* timeline.
*/
EndOfLogTLI = xlogreader->seg.ws_tli;
Test tried to set recovery target just before the end-of-recovery WAL
record. Unfortunately, the test couldn't directly verify EndOfLogTLI
!= replayTLI case, I am not sure how to do that -- any suggestions
will be greatly appreciated. Perhaps, having this test is good to
improve xlog.c test coverage. Also, if you see in other angle test
covers a case where recovery_target_lsn and
recovery_target_inclusive=off which doesn't exist as of now and that
is the reason I have added this test to 003_recovery_targets.pl file.
Thoughts? Suggestions?
--
Regards,
Amul Sul
EDB: http://www.enterprisedb.com