From: | SHARMILA JOTHIRAJAH <sharmi_jo(at)yahoo(dot)com> |
---|---|
To: | General postgres mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | slony1 replication question |
Date: | 2007-12-12 15:41:37 |
Message-ID: | 833009.47320.qm@web31108.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I need some help with slony...
I read the slony 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 = 'slony_example';
$LOGDIR = 'export/home/josh/slony1';
$MASTERNODE = 1;
add_node(node => 1,
host => 'localhost',
dbname => 'pgbench',
port => 5432,
user => 'josh',
password => 'somepassword');
add_node(node => 2,
host => 'localhost',
dbname => 'pgbenchslave',
port => 5432,
user => 'josh',
password => 'somepassword');
}
$SLONY_SETS = {
"set1" => {
"set_id" => 1,
"table_id" => 1,
"sequence_id" => 1,
"pkeyedtables" => [
'accounts',
'tellers',
'branches',
],
"serialtables" => ["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 = 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
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-12-12 15:44:45 | Re: How can I insert NULL into column with the type of timestamp? |
Previous Message | Adrian Klaver | 2007-12-12 15:37:55 | Re: Better alternative for Primary Key then serial?? |