Re: several problems in pg_receivexlog

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: several problems in pg_receivexlog
Date: 2012-08-06 11:48:32
Message-ID: CABUevEyqgdrZ57TLROb6LPVpvfaPrTqvkUP_=4CtiH6PEkafrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 31, 2012 at 5:06 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
>
> Excerpts from Magnus Hagander's message of jue jul 12 07:35:11 -0400 2012:
>> On Tue, Jul 10, 2012 at 6:45 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
>> > 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.
>>
>> Thanks. I get it now, and this explains why I didn't see it before - I
>> didn't check properly after we added the loop mode. Patch applied with
>> minor changes (e.g. there's no point in doing PQfinish(tmpconn) right
>> after you've verified tmpconn is NULL)
>
> For some reason, Magnus neglected to backpatch this to 9.2, so I just
> did.

Thanks. I believe that was just an oversight.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2012-08-06 11:56:35 Re: several problems in pg_receivexlog
Previous Message Amit Kapila 2012-08-06 11:30:32 Re: [WIP] Performance Improvement by reducing WAL for Update Operation