Re: logical changeset generation v4

From: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: logical changeset generation v4
Date: 2013-01-15 03:12:28
Message-ID: 20130115031228.GA14636@toroid.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 2013-01-15 02:38:45 +0100, andres(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2013-01-15 03:25:39 Re: count(*) of zero rows returns 1
Previous Message Tom Lane 2013-01-15 02:39:38 Re: Curious buildfarm failures