Thread: add verbosity to pg_basebackup for sync

add verbosity to pg_basebackup for sync

From
Jeff Janes
Date:
On some recent testing, pg_basebackup -Fp was taking an annoying amount of time to finish once the it was done copying the data.  Using -v seemed to blame this on "waiting for background process to finish streaming", based on that being the last message on display while the delay was happening.

But it was really waiting for the syncs of the new -D dir to finish.  The attached patch adds a -v notice that it is starting to do the sync, with the wording taken from initdb's equivalent message.

I think -P should report everything -v does, just with a carriage return rather than a newline, but that is a larger issue.

Cheers,

Jeff 
Attachment

Re: add verbosity to pg_basebackup for sync

From
Michael Paquier
Date:
On Fri, Jul 27, 2018 at 11:58:42AM -0400, Jeff Janes wrote:
> But it was really waiting for the syncs of the new -D dir to finish.  The
> attached patch adds a -v notice that it is starting to do the sync, with
> the wording taken from initdb's equivalent message.

This is a good idea.  Would we want that back-patched?  I am sure that
nobody is going to complain for an extra informational log.
--
Michael

Attachment

Re: add verbosity to pg_basebackup for sync

From
Michael Paquier
Date:
On Sat, Jul 28, 2018 at 08:10:10AM +0900, Michael Paquier wrote:
> This is a good idea.  Would we want that back-patched?  I am sure that
> nobody is going to complain for an extra informational log.

And pushed to HEAD.
--
Michael

Attachment

Re: add verbosity to pg_basebackup for sync

From
Jeff Janes
Date:
On Fri, Jul 27, 2018 at 7:10 PM, Michael Paquier <michael@paquier.xyz> wrote:
On Fri, Jul 27, 2018 at 11:58:42AM -0400, Jeff Janes wrote:
> But it was really waiting for the syncs of the new -D dir to finish.  The
> attached patch adds a -v notice that it is starting to do the sync, with
> the wording taken from initdb's equivalent message.

This is a good idea.  Would we want that back-patched?  I am sure that
nobody is going to complain for an extra informational log.

Thanks for committing it.  It is probably safer not to backpatch, as someone might have scripts that look at the output of -v so it shouldn't change between minor releases.  I don't think looking at those would be a good idea, but they may have their reasons.  

Cheers,

Jeff

Re: add verbosity to pg_basebackup for sync

From
Michael Paquier
Date:
On Sun, Jul 29, 2018 at 10:45:10AM -0400, Jeff Janes wrote:
> Thanks for committing it.  It is probably safer not to backpatch, as
> someone might have scripts that look at the output of -v so it shouldn't
> change between minor releases.  I don't think looking at those would be a
> good idea, but they may have their reasons.

Yes, I was wondering about this possibility as well.  That's unlikely so
but..  Impossible to be sure.
--
Michael

Attachment