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

From: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Don'st start streaming after creating a slot in pg_receivexlog
Date: 2015-07-29 09:40:30
Message-ID: CACACo5S78RVin=mnW6iz1GpO4F2YOo_+bCZ+=jAywY3-d8ZVPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 29, 2015 at 10:02 AM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
wrote:

> On 07/29/2015 10:58 AM, Michael Paquier wrote:
>
>> On Wed, Jul 29, 2015 at 4:51 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
>> wrote:
>>
>>> On 07/29/2015 10:37 AM, Andres Freund wrote:
>>>
>>>>
>>>> Heikki complained about pg_receivexlog --create-slot starting to stream
>>>> in his talk in St. Petersburg. Saying that that makes it a hard to
>>>> script feature - and I have to agree. Since that option is new to 9.5 we
>>>> can should change that behaviour now if we decide to.
>>>>
>>>
>>> To be clear, I think "pg_receivexlog --create-slot" should only create
>>> the
>>> slot, and exit.
>>>
>>
>> Even if I would like to make pg_recvlogical and pg_receivexlog behave
>> as similarly as possible by having an additional switch --start in
>> pg_receivexlog to control if it starts to stream or not, this ship has
>> already sailed for backward-compatibility's sake... Then let's just
>> create the slot and exit().
>>
>
> 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.
>
> I'm not sure I understand the proposal though. If you don't specify
> --create-slot, nor --start, what would the program do? Nothing?
>

Maybe we should make --start an optional flag for --create-slot in both
pg_recvlogical and pg_receivexlog?

So that if you didn't use --create-slot or --drop-slot, then it is assumed
that you want to start streaming. And if you're using --create-slot, you
can still start streaming right away, though not by default.

At the moment I find it odd that pg_recvlogical -S myslot doesn't start
streaming and require you to use --start explicitly.

--
*Oleksandr Shulgin*
*Database Engineer*

Mobile: +49 160 84-90-639
Email: oleksandr(dot)shulgin(at)zalando(dot)de

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2015-07-29 09:41:34 Re: more RLS oversights
Previous Message Simon Riggs 2015-07-29 08:23:43 Re: Don'st start streaming after creating a slot in pg_receivexlog