Jan Wieck JanWieck
Wed Nov 17 19:34:45 PST 2004
On 11/17/2004 10:40 AM, Dr. St?phane Schildknecht wrote:

> Jan Wieck a ?crit :
> 
>> On 11/2/2004 6:36 PM, Justin Clift wrote:
>>
>>> Hi all,
>>>
>>> Using Slony 1.0.5 for a very simple 2 node master->slave arrangement in
>>> this setup that replicates two tables from the first node to the second.
>>>
>>> Now I'm experimenting with creating a second set, having two different
>>> tables be replicated from the second node back to the first.
>>>
>>> I *think* these commands to Slonik should do the trick, but they're
>>> generating an error at the end telling me the set isn't found:
>>
>>
>> Insert a
>>
>>     wait for event (origin = 2, confirmed = 1);
>>
>> right before the subscribe set and it'll be fine.
>>
>>
>> Jan
> 
> Hi,
> 
> I'm afraid, I can't make it work that way...
> 
>     cluster name = $CLUSTER;
> 
>     node 1 admin conninfo = 'dbname=$DBNAME1 host=$HOST1 user=$SLONY_USER';
>     node 2 admin conninfo = 'dbname=$DBNAME2 host=$HOST2 user=$SLONY_USER';
> 
>     create set ( id = 2, origin = 1, comment = 'All toto tables' );
>     set add table ( set id = 2, origin = 1,
>         id = 3, fully qualified name = 'public.toto',
>         comment = 'Table toto' );
>     set add table ( set id = 2, origin = 1,
>         id = 4, fully qualified name = 'public.toto2',
>         comment = 'Table toto2' );
>     set add table ( set id = 2, origin = 1,
>         id = 5, fully qualified name = 'public.toto3',
>         comment = 'Table toto3' );
>     wait for event (origin = 1, confirmed = 1);

you want that event to be confirmed by node 2, not its own origin.

>     subscribe set ( id = 2, PROVIDER = 1, receiver = 2, forward = no );
>     merge set ( id = 1, add id = 2, origin = 1);

And this is a secure way to screw up the cluster in versions prior to 
1.0.5. The merge set can only be done AFTER node 2 has sucessfully 
subscribed and copied the data.

Sorry, but Slony is not a fire-and-forget system yet ;-)


Jan

> 
> The error :
> 
> CONFIG dropSet: set_id=2
> CONFIG storeSet: set_id=2 set_origin=1 set_comment='All toto tables'
> <stdin>:36: PGRES_FATAL_ERROR select "_replic".subscribeSet(2, 1, 2, 
> 'f');  - ERREUR:  Slony-I: set 2 not found
> 
> Does anybody know why I'm not kind enough to make it work ?
> 
> S at S
> 


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #


More information about the Slony1-general mailing list