Re: Copy function for logical replication slots

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Copy function for logical replication slots
Дата
Msg-id 20180628064727.GL11054@paquier.xyz
обсуждение исходный текст
Ответ на Re: Copy function for logical replication slots  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: Copy function for logical replication slots  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Thu, Jun 28, 2018 at 03:34:00PM +0900, Masahiko Sawada wrote:
> On Thu, Jun 28, 2018 at 12:29 PM, Michael Paquier <michael@paquier.xyz> wrote:
>> Hm.  Shouldn't the original slot copied be owned by the process doing
>> the copy with ReplicationSlotAcquire?
>
> Right, it should do and release it before creating new one.

Yes, or MyReplicationSlot would not like that.

>> There could be some cases where
>> copying a physical slot also makes sense.
>
> I've thought that but I didn't find concrete use case. That's why I
> started with only logical slot.

Let's imagine the case of a single base backup which is associated to a
given replication slot, and that this backup is then used to spawn
multiple standbys where each one of them needs a separate slot to
consume changes at their pace.  If you can copy the slot used in the
first backup, then both nodes could consume it.  That looks useful to
me to make sure that both slots are based a consistent point.
--
Michael

Вложения

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

Предыдущее
От: Rajkumar Raghuwanshi
Дата:
Сообщение: Re: alter index WITH ( storage_parameter = value [, ... ] ) forpartition index.
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Changing the autovacuum launcher scheduling; oldest table first algorithm