Re: pg_basebackup may fail to send feedbacks. - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: pg_basebackup may fail to send feedbacks.
Date
Msg-id CAHGQGwG2bBXW9qb85bYDhHqTffS+t5=CGm2d0aV4zwTq7gx1bQ@mail.gmail.com
Whole thread Raw
In response to Re: pg_basebackup may fail to send feedbacks.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: pg_basebackup may fail to send feedbacks.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
On Thu, Feb 5, 2015 at 10:20 AM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> Hello,
>
> At Wed, 4 Feb 2015 19:22:39 +0900, Fujii Masao <masao.fujii@gmail.com> wrote in
<CAHGQGwGudGCMnHZinkd37i+JijDkruEcrea1NCRs1MMtE3rOFQ@mail.gmail.com>
>> On Wed, Feb 4, 2015 at 4:58 PM, Kyotaro HORIGUCHI
>> <horiguchi.kyotaro@lab.ntt.co.jp> wrote:
>> > I'm very sorry for confused report. The problem found in 9.4.0
>> > and the diagnosis was mistakenly done on master.
>> >
>> > 9.4.0 has no problem of feedback delay caused by slow xlog
>> > receiving on pg_basebackup mentioned in the previous mail. But
>> > the current master still has this problem.
>>
>> Seems walreceiver has the same problem. No?
>
> pg_receivexlog.c would have the same problem since it uses the
> same function with pg_basebackup.c.
>
> The correspondent of HandleCopyStream in wansender is
> WalReceiverMain, and it doesn't seem to have the same kind of
> loop shown below. It seems to surely send feedback per one
> record.
>
> |   r = stream_reader();
> |   while (r > 0)
> |   {
> |      ... wal record processing stuff without sending feedback..
> |      r = stream_reader();
> |   }

WalReceiverMain() has the similar code as follows.
   len = walrcv_receive(NAPTIME_PER_CYCLE, &buf);   if (len != 0)   {       for (;;)       {           if (len > 0)
     {               ....               len = walrcv_receive(0, &buf);           }   }
 

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: binworld and install-binworld targets - was Re: Release note bloat is getting out of hand
Next
From: Ian Barwick
Date:
Subject: Re: Docs: CREATE TABLESPACE minor markup fix