HI All,
Following comment in RemoveNonParentXlogFiles() says that we are trying to remove any WAL file whose segment number is >= the segment number of the first WAL file on the new timeline. However, looking at the code, I can say that we are trying to remove the WAL files from the previous timeline whose segment number is just greater than (not equal to) the segment number of the first WAL file in the new timeline. I think we should improve this comment, thoughts?
/*
* Remove files that are on a timeline older than the new one we're
* switching to, but with a segment number >= the first segment on the
* new timeline.
*/
if (strncmp(xlde->d_name, switchseg, 8) < 0 &&
strcmp(xlde->d_name + 8, switchseg + 8) > 0)
--
With Regards,
Ashutosh Sharma.