From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: behave of --create-slot option |
Date: | 2018-05-29 03:51:30 |
Message-ID: | CAFj8pRC8HwFbV_oL_opJrB+iTqZWjBG-=5wWazdTeXaZw2h2mg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2018-05-29 3:28 GMT+02:00 Craig Ringer <craig(at)2ndquadrant(dot)com>:
> On 29 May 2018 at 03:41, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>
>> Hi
>>
>> I am writing a article about PostgreSQL 11 features. Now I am looking on
>> new option --create-slot option of pg_basebackup command.
>>
>> I don't understand to use case for this option, because It fails when
>> requested slot already exists. I cannot to imagine use case for this. If I
>> write some scripts, then I prefer the behave like "create if doesn't exist
>> or do nothing".
>>
>> Any repeated running of script with this option should to fail. Is it
>> required? Why?
>>
>>
> The slot is intended to then be used by a replica that was created by
> pg_basebackup. I think it writes the slot name into recovery.conf; if it
> doesn't, it should.
>
> So you use a unique slot name for each replica.
>
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.
Regards
Pavel
> --
> Craig Ringer http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2018-05-29 04:11:52 | Re: behave of --create-slot option |
Previous Message | Yuriy Zhuravlev | 2018-05-29 01:59:47 | Re: Is a modern build system acceptable for older platforms |