Re: behave of --create-slot option - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: behave of --create-slot option
Date
Msg-id CAMsr+YG_wNpwfmAWow706MpCjUDEZQF3_VFB0=eJ76nFWkdb=A@mail.gmail.com
Whole thread Raw
In response to Re: behave of --create-slot option  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: behave of --create-slot option  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 29 May 2018 at 11:51, Pavel Stehule <pavel.stehule@gmail.com> wrote:
 

I understand so slot should be unique. But same result (unique rep slot) can be done, if it does nothing when slot exists already. This behave is not idempotent. 

Maybe I am search problem, where it is not. Just, when I see some "create object" option, I expect any way, how I can enforce "--if-exists", because it was necessary in major cases.


If the slot already exists, don't you expect it to be in use for an existing replica?

I guess what you seem to want is to be able to delete the replica then re-clone it and use the same slot?

Generally I'd expect you to delete the slot when you remove the replica. Really what this says to me is that we should have a way to delete the upstream slot when we promote or decommission a physical replica. 



--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: behave of --create-slot option
Next
From: Pavel Stehule
Date:
Subject: Re: behave of --create-slot option