Re: 2pc leaks fds

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: 2pc leaks fds
Дата
Msg-id 20200406071610.s4xd4c37wu5ds7vk@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: 2pc leaks fds  (Antonin Houska <ah@cybertec.at>)
Список pgsql-hackers
Hi,

On 2020-04-06 09:12:32 +0200, Antonin Houska wrote:
> Andres Freund <andres@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: pg_stat_statements issue with parallel maintenance (Was Re: WALusage calculation patch)
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: pg_stat_statements issue with parallel maintenance (Was Re: WALusage calculation patch)