Re: Don'st start streaming after creating a slot in pg_receivexlog - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Don'st start streaming after creating a slot in pg_receivexlog
Date
Msg-id CAB7nPqTcXdTeCFikcghtgFjqHKN4NeBA8qmr20fe3VVPE74vdw@mail.gmail.com
Whole thread Raw
In response to Re: Don'st start streaming after creating a slot in pg_receivexlog  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Don'st start streaming after creating a slot in pg_receivexlog
List pgsql-hackers
On Wed, Jul 29, 2015 at 8:51 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Wed, Jul 29, 2015 at 5:02 PM, Heikki Linnakangas wrote:
>> Hmm. pg_receivelogical is basically a debugging tool. I don't think anyone
>> will have it integrated into production scripts etc. So maybe we could just
>> change it.
>
> This sounds good to me as well.
>
>> I'm not sure I understand the proposal though.
>
> In short, I would propose the following:
> - Have --create-slot only create a slot, then exit for both
> pg_recvlogical and pg_receivexlog.
> - Have --drop-slot drop a slot, then exit.
> - Remove the --start switch in pg_recvlogical, and let the utility
> start streaming by default.
> By doing so both utilities will behave similarly with the same set of options.
>
>> If you don't specify
>> --create-slot, nor --start, what would the program do? Nothing?
>
> Complain if neither --create-slot nor --drop-slot nor --start are specified:
> $ pg_recvlogical -f - --slot toto -d postgres
> pg_recvlogical: at least one action needs to be specified
> Try "pg_recvlogical --help" for more information.
> $ echo $?
> 1

Here is a patch implementing those things. IMO if-not-exists does not
make much sense anymore. Documentation has been shuffled a bit as
well.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Don'st start streaming after creating a slot in pg_receivexlog
Next
From: Andres Freund
Date:
Subject: Re: Don'st start streaming after creating a slot in pg_receivexlog