Re: pg_basebackup -x stream from the standby gets stuck - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: pg_basebackup -x stream from the standby gets stuck
Date
Msg-id CAHGQGwFTf5A=xw2tiXHLWGQPhf+RT=0Bkkaq-yt1fOhu8EP6tg@mail.gmail.com
Whole thread Raw
In response to Re: pg_basebackup -x stream from the standby gets stuck  (Magnus Hagander <magnus@hagander.net>)
Responses Re: pg_basebackup -x stream from the standby gets stuck
List pgsql-hackers
On Wed, May 23, 2012 at 9:25 PM, Magnus Hagander <magnus@hagander.net> wrote:
> While reviewing and cleaning this patch up a bit I noticed it actually
> broke pg_receivexlog in the renaming.
>
> Here is a new version of the patch, reworked based on the above so
> we're down to a single callback. I moved the "rename last segment file
> even if it's not complete" to be a parameter into ReceiveXlogStream()
> instead of trying to overload a third functionality on the callback
> (which is what broke pg_receivexlog).
>
> How does this look? Have I overlooked any cases?

Thanks for the patch! Looks good to me except the followings:
   pg_basebackup.c:233: warning: passing argument 6 of
'ReceiveXlogStream' from incompatible pointer type

I got the above warning on compile. To fix this, the third argument
"segment_finished"
needs to be added to reached_end_position().

It seems confusing that *stream_continue()* returns TRUE when
streaming *cannot continue*, i.e.,
its name seems to be inconsistent with what it does. What about
renaming it to stream_stop?
Similarly, it also seems confusing that *continue_streaming()* returns
TRUE when streaming
*cannot continue*.

Regards,

-- 
Fujii Masao


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: "could not open relation with OID" errors after promoting the standby to master
Next
From: Robert Haas
Date:
Subject: Re: [RFC] Interface of Row Level Security