Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group