Hi,

On 2020-04-06 09:12:32 +0200, Antonin Houska wrote:
> Andres Freund <and...@anarazel.de> wrote:
> 
> > > From what I can see, the error is that the code only bothers closing
> > > WALOpenSegment->seg when switching to a new segment, but we need also
> > > to close it when finishing the business in XLogReaderFree().
> > 
> > Yea, I came to the same conclusion and locally fixed it the same way
> > (except having the close a bit earlier in XLogReaderFree()).
> 
> It's still not quite clear to me why the problem starts to appear after
> 0dc8ead46.  This patch does not remove any close() call from XLogReaderFree().

Before that change the file was also kind of leaked, but would use the
same static variable to store the fd and thus close it.

Greetings,

Andres Freund


Reply via email to