Tim Goodaire tgoodair
Sat Dec 11 00:22:21 PST 2004
It looks to me that the problem with your script is that your syntax 
here is wrong:

set add table ( set id = $TEMP_SET_ID, origin = 1, id = 111, full
qualified name = 'public.foo' );
   set add table ( set id = $TEMP_SET_ID, origin = 1, id = 112, full
qualified name = 'public.bar' );

It's not "full qualified name". It's "fully qualified name".

Your script was probably just telling you 'failure', but I'll bet that 
there were some messages about
your syntax error in the slony logs.

Also, Chris' advice is good advice to follow. It's wise to do one thing 
at a time with slony. Create a set,
check your logs to make sure that everything is fine, and then subscribe 
the set and check the logs again.

Tim

Christopher Browne wrote:

>James Black <jfb at iparadigms.com> writes:
>  
>
>>Thanks for the quick reply.  In this simple test case, the two tables
>>that I'm adding are empty; the application will handle filling the
>>master at some point after the database is prepared.  However, I've
>>run into a strange problem: I can't subscribe the new, temporary set.
>>Here's the script that I'm using (assume the env vars are correct):
>>
>>${SLONIK} <<EOF
>>cluster name=$CLUSTER_NAME;
>>node 1 admin conninfo = '$MASTER_CONNINFO';
>>node 2 admin conninfo = '$SLAVE_CONNINFO';
>>
>>echo 'create a new temp set';
>>
>>try {
>>   # 110 is the current MAX(tab_id)
>>
>>   create set ( id = $TEMP_SET_ID, origin = 1, comment = 'temporary
>>set' );
>>
>>   echo 'new set created';
>>
>>   set add table ( set id = $TEMP_SET_ID, origin = 1, id = 111, full
>>qualified name = 'public.foo' );
>>   set add table ( set id = $TEMP_SET_ID, origin = 1, id = 112, full
>>qualified name = 'public.bar' );
>>
>>   echo 'new tables added';
>>
>>   subscribe set ( id = $TEMP_SET_ID, provider = 1, receiver = 2,
>>forward = no );
>>
>>   echo 'subscription ok';
>>
>>} on success {
>>   echo 'OK!';
>>} on error {
>>   echo 'failure!';
>>}
>>    
>>
>
>One problem here is that you're sticking the SUBSCRIBE SET inside the
>try block.
>
>That's just not a useful thing to try{} to do.
>
>Take it out of the try block, or perhaps even put it in a separate
>Slonik script, and you'll find it easier to debug what's going on...
>  
>



More information about the Slony1-general mailing list