In response to Lawrence Wong <[email protected]>:

> 
> Hi,
> I am trying to replicate two databases in a simple 1 master, 1 slave 
> configuration.  I was successful with one database but unsuccessful with 2.  
> I was wondering if anyone could point out my mistake in my slonik script 
> trying to replicate 2 databases.  I have read that a simple way to go around 
> is to have the tables in the same schema but I would like to keep the 
> databases separate.  Here is my slonik script:

Wow.  Hotmail really mangled your email.  Just ran everything together.

Looking at the config, I don't see anything obviously wrong.  Here are
some guesses as to what might be causing you trouble and/or how to
debug further
1) Did you start 2 slon processes on each server?  You'll need a separate
   slon for each cluster.
2) Perhaps try splitting that config in two and submitting separately.  I
   don't know that submitting it all at once _won't_ work, but I've never
   tried it.
3) What's in slony's log files?

If I were a betting man, I'd put money that #1 is the problem.

I assume this is what the config is supposed to look like:

cluster name = slony_dbOne;
node 1 admin conninfo='host=192.168.112.4 dbname=db user=postgres 
password=postgres';
node 2 admin conninfo='host=192.168.112.5 dbname=db user=postgres 
password=postgres';
init cluster (id=1,comment='node 1 dbOne');
#CREATE SET
create set (id = 1, origin = 1, comment = 'tables');
#SET ADD TABLE
set add table (set id=1, origin=1, id=1, fully qualified name = 
'schema1.table2',comment='');
set add table (set id=1, origin=1, id=2, fully qualified name = 
'schema1.table2',comment='');
#STORE NODE
store node ( id = 2, comment = 'node 2 dbOne' );
#STORE PATH
store path ( server = 1, client = 2,    conninfo = 'dbname=db 
host=192.168.112.4 user=postgres password=postgres');
store path ( server = 2, client = 1,    conninfo = 'dbname=db 
host=192.168.112.5 user=postgres password=postgres');
#STORE LISTEN
store listen ( origin = 1, provider = 1, receiver = 2 );
store listen ( origin = 2, provider = 2, receiver = 1 );

cluster name = slony_dbTwo;
node 3 admin conninfo='host=192.168.112.4 dbname=dbTwo user=postgres 
password=postgres';
node 4 admin conninfo='host=192.168.112.5 dbname=dbTwo user=postgres 
password=postgres';
init cluster (id=3,comment='node 1 dbTwo');
#CREATE SET
create set (id = 2, origin = 3, comment = 'tables');
#SET ADD TABLE
set add sequence (set id=2, origin=3, id=1, fully qualified name = 
'schema1.table1', comment='');
#STORE NODE
store node ( id = 4, comment = 'node 2 dbTwo' );
#STORE PATH
store path ( server = 3, client = 4, conninfo = 'dbname=dbTwo 
host=192.168.112.4 user=postgres password=postgres');
store path ( server = 4, client = 3, conninfo = 'dbname=dbTwo 
host=192.168.112.5 user=postgres password=postgres');
#STORE LISTEN
store listen ( origin = 3, provider = 3, receiver = 4 );
store listen ( origin = 4, provider = 4, receiver = 3 );

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general

Reply via email to