Re: several problems in pg_receivexlog

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

On Tue, Jul 31, 2012 at 6:50 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Wed, Aug 1, 2012 at 12:09 AM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
>>
>> Excerpts from Fujii Masao's message of mar jul 17 13:58:38 -0400 2012:
>>
>>> >> You're right. If the error is detected, that function always returns false
>>> >> and the error message is emitted (but I think that current error message
>>> >> "pg_basebackup: child process exited with error 1" is confusing....),
>>> >> so it's OK. But if walsender in the server is terminated by SIGTERM,
>>> >> no error is detected and pg_basebackup background process gets out
>>> >> of the loop in ReceiveXlogStream() and returns true.
>>> >
>>> > Oh. Because the server does a graceful shutdown. D'uh, of course.
>>> >
>>> > Then yes, your suggested fix seems like a good one.
>>>
>>> Attached patch adds the fix.
>>>
>>> Also I found I had forgotten to set the file descriptor to -1 at the end of
>>> ReceiveXlogStream(), in previously-committed my patch. Attached patch
>>> fixes this problem.
>>
>> This hasn't been committed yet AFAICT, and it probably needs a refresh
>> now after my changes to pg_basebackup. Please update the patch.
>
> I attached the updated version.

Thanks, applied.

>> Also,
>> if this is not in the Open Items list, please put it there so that we
>> don't forget it before the 9.2 release.
>
> Yep, done.

And I'll go take it off :-)

--
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 Heikki Linnakangas 2012-08-06 11:59:43 Re: Re: [COMMITTERS] pgsql: Fix mapping of PostgreSQL encodings to Python encodings.
Previous Message Magnus Hagander 2012-08-06 11:48:32 Re: several problems in pg_receivexlog