Re: logical changeset generation v4

Поиск
Список
Период
Сортировка
От Abhijit Menon-Sen
Тема Re: logical changeset generation v4
Дата
Msg-id 20130115031228.GA14636@toroid.org
обсуждение исходный текст
Ответ на logical changeset generation v4  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
At 2013-01-15 02:38:45 +0100, andres@2ndquadrant.com wrote:
>
> 2) Currently the logical replication infrastructure assigns a
> 'slot-id' when a new replica is setup. That slot id isn't really
> nice (e.g. "id-321578-3"). It also requires that [18] keeps state
> in a global variable to make writing regression tests easy.
> 
> I think it would be better to make the user specify those replication
> slot ids, but I am not really sure about it.

I agree, it would be better to let the user name the slot (and report an
error if the given name is already in use).

> 3) Currently no options can be passed to an output plugin. I am
> thinking about making "INIT_LOGICAL_REPLICATION 'plugin'" accept the
> now widely used ('option' ['value'], ...) syntax and pass that to the
> output plugin's initialization function.

Sounds good.

> 4) Does anybody object to:
> -- allocate a permanent replication slot
> INIT_LOGICAL_REPLICATION 'plugin' 'slotname' (options);
> 
> -- stream data
> START_LOGICAL_REPLICATION 'slotname' 'recptr';
> 
> -- deallocate a permanent replication slot
> FREE_LOGICAL_REPLICATION 'slotname';

That looks fine, but I think it should be:

INIT_LOGICAL_REPLICATION 'slotname' 'plugin' (options);

i.e., swap 'plugin' and 'slotname' in your proposal to make the slotname
come first for all three commands. Not important, but a wee bit nicer.

-- Abhijit



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Curious buildfarm failures
Следующее
От: Gurjeet Singh
Дата:
Сообщение: Re: count(*) of zero rows returns 1