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