Mon Jul 11 06:50:42 PDT 2005
- Previous message: [Slony1-general] How can we replicate data of master table to slave table without affecting currently existing slave table rows
- Next message: [Slony1-general] Adding tables to an existing set in Slony1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,everyone. in practice slonyI . come into contact with some question like this.if you know,please give some tip for me.Thanks very much ! question 1: test=# EXECUTE SCRIPT (SET ID = 1 , FILENAME = '/u2/master/betty/create.sql' , EVENT NODE = 1 ); exec command show errors : ERROR: syntax error at or near "ID" at character 21 why ? this is read document do it . create.sql : create table COMPANY_INFO ( INFO_ID NUMERIC(6) not null, TO_NAME VARCHAR(256) null, constraint PK_COMPANY_INFO primary key (INFO_ID) ); COMMIT TRANSACTION ; help say: SET ID = ival The unique numeric ID number of the set affected by the script this "SET ID" should is create by create set (id=1, origin=1, comment='All pgbench tables'); appointed value of "id" options.is or not ? Question 2: about Subscribing Nodes first : set up a set use script setCluster.sh #!/bin/sh CLUSTERNAME=test1 MASTERDBNAME=test MASTERPORT=8432 SLAVEDBNAME=test SLAVEPORT=8432 MASTERHOST=10.10.10.67 SLAVEHOST=10.10.10.36 REPLICATIONUSER=master PGBENCHUSER=master export CLUSTERNAME MASTERDBNAME MASTERPORT SLAVEDBNAME SLAVEPORT MASTERHOST SLAVEHOST REPLICATIONUSER PGBENCHUSER slonik <<_EOF_ cluster name = $CLUSTERNAME; node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST user=$REPLICATIONUSER'; node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST user=$PGBENCHUSER'; init cluster ( id=1, comment = 'Master Node'); table add key (node id = 1, fully qualified name = 'public.history'); create set (id=1, origin=1, comment='All pgbench tables'); set add table (set id=1, origin=1, id=1, fully qualified name = 'public.accounts', comment='accounts table'); set add table (set id=1, origin=1, id=2, fully qualified name = 'public.branches', comment='branches table'); set add table (set id=1, origin=1, id=3, fully qualified name = 'public.tellers', comment='tellers table'); set add table (set id=1, origin=1, id=4, fully qualified name = 'public.history', comment='history table', key = serial); store node (id=2, comment = 'Slave node'); store path (server = 1, client = 2, conninfo='dbname=$MASTERDBNAME host=$MASTERHOST user=$REPLICATIONUSER'); store path (server = 2, client = 1, conninfo='dbname=$SLAVEDBNAME host=$SLAVEHOST user=$PGBENCHUSER'); store listen (origin=1, provider = 1, receiver =2); store listen (origin=2, provider = 2, receiver =1); _EOF_ second : if have need add node 3 to this set(cluster name=test1 and set id=1) how to do it ? I read document about Subscribing Nodes chapter slonik <<_EOF_ try { echo 'Subscribing sets'; subscribe set (id = 1, provider=1, receiver=2, forward=yes); subscribe set (id = 1, provider=1, receiver=3, forward=yes); subscribe set (id = 1, provider=1, receiver=4, forward=yes); } on error { echo 'Could not subscribe the sets!'; exit -1; } _EOF_ my question is : when create "set 1" ?define "node 1 admin conninfo" and "node 2 admin conninfo" info (host , username , dbname). when add node 3 to "set 1" , why not need define "node 3 admin conninfo" info? if no define,how to know relation info(host,username,dbname) of node 3? and couldn't this need to come true ? how to do it ? Thank you for your help. --------------------------------- DO YOU YAHOO!? ????G??????????????????? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://gborg.postgresql.org/pipermail/slony1-general/attachments/20050711/a9b9a071/attachment.html
- Previous message: [Slony1-general] How can we replicate data of master table to slave table without affecting currently existing slave table rows
- Next message: [Slony1-general] Adding tables to an existing set in Slony1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list