Wed Dec 12 07:13:25 PST 2007
- Previous message: [Slony1-general] slonik cluster creation question
- Next message: [Slony1-general] shortcut for telling slony to simply replicate everything?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Dec 12, 2007 6:50 AM, <postgres at dac.e4ward.com> wrote: > On Dec 12, 2007 12:13 AM, Josh Harrison <joshques at gmail.com> wrote: > > Is there any special commands that should be used to execute the slonik > > scripts? > > What is slon_tools.conf. Should this be configured for using slony1? > > thanks > > josh > > You should read slony's documentation [1]. But this particular > question can be answered by reading about the altperl administrative > scripts [2]. > > [1] http://www.slony.info/documentation/ > [2] http://www.slony.info/documentation/adminscripts.html > > Thanks I rad the above manual and tried to replicate the database as given in this... http://www.slony.info/documentation/firstdb.html These are the steps that I did. 1. set the shell variables like clustername,masterdbname etc thro export command 2. created a user 'josh' with 'somepassword' 3. createdb -O $PGBENCHUSER -h $MASTERHOST $MASTERDBNAME createdb -O $PGBENCHUSER -h $SLAVEHOST $SLAVEDBNAME pgbench -i -s 1 -U $PGBENCHUSER -h $MASTERHOST $MASTERDBNAME 4.createlang -h $MASTERHOST plpgsql $MASTERDBNAME 5.pg_dump -s -U $REPLICATIONUSER -h $MASTERHOST $MASTERDBNAME | psql -U $REPLICATIONUSER -h $SLAVEHOST $SLAVEDBNAME 6. pgbench -s 1 -c 5 -t 1000 -U $PGBENCHUSER -h $MASTERHOST $MASTERDBNAME 7. slony1 was configured using --perltools option. I copied slon_tools.conf-sample to slon_tools.conf and placed it in the /etc dir. This is my conf file (deleted the commented lines here for clarity) ------------------------------------------------------------- if ($ENV{"SLONYNODES"}) { require $ENV{"SLONYNODES"}; } else { $CLUSTER_NAME =3D 'slony_example'; $LOGDIR =3D 'export/home/sjothirajah/slony1'; # $APACHE_ROTATOR =3D '/usr/local/apache/bin/rotatelogs'; # SYNC check interval (slon -s option) # $SYNC_CHECK_INTERVAL =3D 1000; $MASTERNODE =3D 1; add_node(node =3D> 1, host =3D> 'localhost', dbname =3D> 'pgbench', port =3D> 5432, user =3D> 'josh', password =3D> 'somepassword'); add_node(node =3D> 2, host =3D> 'localhost', dbname =3D> 'pgbenchslave', port =3D> 5432, user =3D> 'josh', password =3D> 'somepassword'); } $SLONY_SETS =3D { "set1" =3D> { "set_id" =3D> 1, "table_id" =3D> 1, "sequence_id" =3D> 1, "pkeyedtables" =3D> [ 'accounts', 'tellers', 'branches', ], "serialtables" =3D> ["history"], }, }; if ($ENV{"SLONYSET"}) { require $ENV{"SLONYSET"}; } 1; -------------------------------------------------------------- 8. slonik_init_cluster | slonik <stdin>:10: Set up replication nodes <stdin>:13: Next: configure paths for each node/origin <stdin>:16: Replication nodes prepared <stdin>:17: Please start a slon replication daemon for each node 9. slon_start 1 ...... Slon successfully started for cluster slony_example, node node1 Start the watchdog process as well... 10.slon_start 2 ... Slon successfully started for cluster slony_example, node node2 PID [16697] Start the watchdog process as well... 11. slonik_create_set 1 cluster name =3D slony_example; .... ..... echo 'All tables added'; 12. slonik_subscribe_set 1 2 | slonik <stdin>:4: PGRES_FATAL_ERROR select "_slony_example".subscribeSet(1, 1, 2, 't'); - ERROR: Slony-I: subscribeSet(): set 1 not found What is this error? What am I doing wrong here? When i check the pgbenchslave database, the table rows are not replicated? Please advice Thanks josh -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.slony.info/pipermail/slony1-general/attachments/20071212/= 2dc1ef81/attachment.htm
- Previous message: [Slony1-general] slonik cluster creation question
- Next message: [Slony1-general] shortcut for telling slony to simply replicate everything?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list