On Dec 16, 2016 07:27, "Michael Paquier" <michael.paqu...@gmail.com> wrote:
On Thu, Dec 15, 2016 at 7:28 PM, Magnus Hagander <mag...@hagander.net>
> So here's a patch that does this, for discussion. It implements the
> following behavior for -X:
> * When used with <10.0 servers, behave just like before.
> * When -S <name> is specified, behave just like before (use an existing
> replication slot, fail if it does not exist)
> * When used on 10.0 with no -S, create and use a temporary replication
> while running, with name pg_basebackup_<pid>.
> * When used with 10.0 with no -S but --no-slot specified, run without a
> like before.
There are users using -X stream without a slot now because they don't want
cause WAL retention in pg_xlog and are ready for retries in taking the base
backup... I am wondering if it is a good idea to change the default behavior
and not introduce a new option like --temporary-slot, or
--slot-mode=temp|persistent|none with none being the default instead. There
are users caring about pg_xlog not filling up if pg_basebackup hangs on
for example. And it may be a good idea to be able to use --slot-mode=temp
with -S/--slot actually to allow users to monitor it. If no slot name is
with --slot generating one looks fine to me.
I really think the default should be "what most people want", and not
"whatever is compatible with a mode that was necessary because we lacked
Yes there are some people who are fine with their backups failing. I'm
willing to say there are *many* more who benefit from an automatic slot.
Regarding the patch, it would be good to add a set of TAP tests to cover the
new features. I am not seeing anything badly wrong with it at first sight by
I don't really know how to write a good test for it. I mean, we could run
it with the parameter, but how to we make it actually verify the slot? Make
a really big database to make it guaranteed to be slow enough that we can
notice it in a different session?