<div dir="ltr">On Fri, Oct 17, 2014 at 9:23 PM, Fujii Masao <span dir="ltr"><<a href="mailto:masao.fujii@gmail.com"
target="_blank">masao.fujii@gmail.com</a>></span>wrote:<br /><div class="gmail_extra"><div
class="gmail_quote"><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">In this case, the patch seems to make the restartpoint recycle even WAL files<br /> which have
.readyfiles and will have to be archived later. Thought?<span><font color="#888888"><br
/></font></span></blockquote></div>Thereal problem currently is that it is possible to have a segment file not marked
as.done during recovery when stream connection is abruptly cut when this segment is switched, marking it as .ready in
archive_statusand simply letting this segment in pg_xlog because it will neither be recycled nor removed. I have not
beenable to look much at this code these days, so I am not sure how invasive it would be in back-branches, but perhaps
weshould try to improve code such as when a segment file is switched and connection to the is cut, we guarantee that
thisfile is completed and marked as .done.<br />-- <br />Michael<br /></div></div>