Re: Don'st start streaming after creating a slot in pg_receivexlog

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Don'st start streaming after creating a slot in pg_receivexlog
Дата
Msg-id CAB7nPqTcXdTeCFikcghtgFjqHKN4NeBA8qmr20fe3VVPE74vdw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Don'st start streaming after creating a slot in pg_receivexlog  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Don'st start streaming after creating a slot in pg_receivexlog  (Andres Freund <andres@anarazel.de>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Don'st start streaming after creating a slot in pg_receivexlog
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Don'st start streaming after creating a slot in pg_receivexlog