Re: several problems in pg_receivexlog

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: several problems in pg_receivexlog
Дата
Msg-id CAHGQGwGy0MnvRS2ZOuvfQe2dN7KDkHBmUx65h2+G4peSqK2EhQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: several problems in pg_receivexlog  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: several problems in pg_receivexlog  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
On Tue, Jul 10, 2012 at 6:27 AM, Magnus Hagander <magnus@hagander.net> wrote:
> On Mon, Jul 9, 2012 at 8:23 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> Hi,
>>
>> I found several problems in pg_receivexlog, e.g., memory leaks,
>> file-descripter leaks, ..etc. The attached patch fixes these problems.
>
> While I don't doubt that what you've found are real problems, would
> you mind explaining exactly what they are, so we don't have to
> reverse-engineer the patch to figure that out?

Yep.

When an error happens after replication connection has been established,
pg_receivexlog doesn't close an open file descriptor and release an allocated
memory area. This was harmless before 16282ae688de2b320cf176e9be8a89e4dfc60698
because pg_receivexlog exits immediately when an error happens. But
currently in an error case, pg_receivexlog tries reconnecting to the server
infinitely, so file descriptors and memory would leak. I think this is problem
and should be fixed. The patch which I submitted yesterday changes
pg_receivexlog so that it closes the open file and frees the memory area
before reconnecting to the server.

Regards,

-- 
Fujii Masao


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] psql \n shortcut for set search_path =
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Synchronous Standalone Master Redoux