John Sidney-Woollett johnsw
Mon Jan 17 21:16:55 PST 2005
Thanks for the tip - I didn't realise that the set might not be 
propogated yet.

John Sidney-Woollett

Jan Wieck wrote:

> On 1/17/2005 1:00 PM, John Sidney-Woollett wrote:
> 
>> Can anyone explain what this error means:
>>
>> ./replicate_subscribe.sh
>> <stdin>:10: PGRES_FATAL_ERROR select "_bpixreplicate".subscribeSet(1, 
>> 1, 2, 'f');  - ERROR:  Slony-I: set 1 not found
> 
> 
> You try to subscribe before the set creation has propagated onto node 2. 
> Look for "wait for event" and put that into the script that creates the 
> set, so that it doesn't terminate before the set is known to node 2.
> 
> 
> Jan
> 
>>
>> Help?!
>>
>> John Sidney-Woollett
>>
>> Here's the subscribe script that is causing the error when it is 
>> executed.
>>
>> =======================================
>> slonik script to subscribe to set
>> =======================================
>> #!/bin/bash
>>
>> /usr/local/pgsql/bin/slonik << _END_
>>
>> # define the cluster namespace
>> cluster name = bpixreplicate;
>>
>> # define two nodes connection information
>> node 1 admin conninfo = 'dbname=bpix_live host=host1 user=postgres';
>> node 2 admin conninfo = 'dbname=bpix_live host=host2 user=postgres';
>>
>> # node 2 subscribes to set 1 (node 1 to node 2)
>> subscribe set (id=1, provider=1, receiver=2, forward=no);
>>
>> _END_
>>
>>
>> Here is the data in the "master" database in the "_bpixreplicate" schema
>>
>> select * from _bpixreplicate.sl_set;
>>   set_id | set_origin | set_locked |   set_comment
>> --------+------------+------------+-----------------
>>        1 |          1 |            | bpix statistics
>>
>> and
>>
>> select * from _bpixreplicate.sl_table ;
>>   tab_id | tab_reloid | tab_set |     tab_idxname      | tab_altered | 
>>        tab_comment
>> --------+------------+---------+----------------------+-------------+---------------------------- 
>>
>>        1 |      17415 |       1 | stdayalbumstats_pkey | t           | 
>> statistics.stdayalbumstats
>>        2 |      17417 |       1 | sthitstats_pkey      | t           | 
>> statistics.sthitstats
>>        3 |      17489 |       1 | stsession_pkey       | t           | 
>> statistics.stsession
>>        4 |      17504 |       1 | sturllog_pkey        | t           | 
>> statistics.sturllog
>>
>>
>> And here is the script to set replication up
>>
>> =======================================
>> slonik script to setup replication
>> =======================================
>> #!/bin/bash
>>
>> /usr/local/pgsql/bin/slonik << _END_
>>
>> # define the cluster namespace
>> cluster name = bpixreplicate;
>>
>> # define two nodes connection information
>> node 1 admin conninfo = 'dbname=bpix_live host=host1 user=postgres';
>> node 2 admin conninfo = 'dbname=bpix_live host=host2 user=postgres';
>>
>> # create the first node and cluster
>> # this is the master
>> init cluster (id=1, comment='host1 Master 7.4.4');
>>
>> # create the second slave node
>> store node (id=2, comment='host2 Slave 7.4.6');
>>
>> # create the replication sets
>> create set (id=1, origin=1, comment='bpix statistics');
>> set add table (set id=1, origin=1, id=1, full qualified 
>> name='statistics.stdayalbumstats');
>> set add table (set id=1, origin=1, id=2, full qualified 
>> name='statistics.sthitstats');
>> set add table (set id=1, origin=1, id=3, full qualified 
>> name='statistics.stsession');
>> set add table (set id=1, origin=1, id=4, full qualified 
>> name='statistics.sturllog');
>>
>> # define the paths between the servers
>> store path (server=1, client=2, conninfo='dbname=bpix_live host=host1 
>> user=postgres');
>> store path (server=2, client=1, conninfo='dbname=bpix_live host=host2 
>> user=postgres');
>>
>> # define the listeners and who provides the master data
>> store listen (origin=1, provider=1, receiver=2);
>> store listen (origin=2, provider=2, receiver=1);
>>
>> # node 2 subscribes to set 1 (node 1 to node 2)
>> #subscribe set (id=1, provider=1, receiver=2, forward=no);
>>
>> _END_
>>
>> _______________________________________________
>> Slony1-general mailing list
>> Slony1-general at gborg.postgresql.org
>> http://gborg.postgresql.org/mailman/listinfo/slony1-general
> 
> 
> 


More information about the Slony1-general mailing list