From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Antonin Houska <ah(at)cybertec(dot)at> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Subject: | Re: 2pc leaks fds |
Date: | 2020-04-06 07:16:10 |
Message-ID: | 20200406071610.s4xd4c37wu5ds7vk@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2020-04-06 09:12:32 +0200, Antonin Houska wrote:
> Andres Freund <andres(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2020-04-06 07:24:53 | Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch) |
Previous Message | Amit Kapila | 2020-04-06 07:16:05 | Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch) |