Home > Archive > Slony1 PostgreSQL Replication > August 2005 > Problem with Database Replication









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problem with Database Replication
Steven Prasetya

2005-08-04, 9:25 am

I created 2 databases (master & slave) and use the following setup script:

====================
====================
==========
#!/bin/sh
CLUSTER=sql_cluster
DB1=contactdb
DB2=contactdb_slave
H1=localhost
H2=localhost
U=postgres
slonik <<_EOF_
cluster name = $CLUSTER;
node 1 admin conninfo = 'dbname=$DB1 host=$H1 user=$U';
node 2 admin conninfo = 'dbname=$DB2 host=$H2 user=$U';
init cluster (id = 1, comment = 'Node 1');
create set (id = 1, origin = 1, comment = 'contact table');
set add table (set id = 1, origin = 1, id = 1, full qualified name =
'public.contact', comment = 'Table contact');
set add sequence (set id = 1, origin = 1, id = 2, full qualified name =
'public.contact_seq', comment = 'Sequence contact_seq');
store node (id = 2, comment = 'Node 2');
store path (server = 1, client = 2,
conninfo = 'dbname=$DB1 host=$H1 user=$U');
store path (server = 2, client = 1,
conninfo = 'dbname=$DB2 host=$H2 user=$U');
store listen (origin = 1, provider = 1, receiver = 2);
store listen (origin = 2, provider = 2, receiver = 1);
====================
====================
==========
Then I tried to run a subscribe script below:

====================
====================
==========
#!/bin/sh
CLUSTER=sql_cluster
DB1=contactdb
DB2=contactdb_slave
H1=localhost
H2=localhost
U=postgres
slonik <<_EOF_
cluster name = $CLUSTER;
node 1 admin conninfo = 'dbname=$DB1 host=$H1 user=$U';
node 2 admin conninfo = 'dbname=$DB2 host=$H2 user=$U';
subscribe set (id = 1, provider = 1, receiver = 2, forward = yes);
====================
====================
==========

I got the following error message:

====================
====================
==========
<stdin>:4: Error: namespace "_sql_cluster" already exists in database of
node 1
-bash-3.00$ ./cluster_setup.sh
-bash-3.00$ ./subscribe.sh
<stdin>:4: NOTICE: subscribeSet:: set 1 has no tables - risk of problems -
see bug 1226
<stdin>:4: NOTICE:
http://gborg.postgresql.org/project...update.php?1226
====================
====================
==========

The weird thing is, the database is NOT empty. The table "contact" is there,
so the error message doesn't make sense. Please help. Thanks.
Tim Goodaire

2005-08-04, 1:27 pm

____________________
____________________
_______
Slony1-general mailing list
Slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
http://gborg.postgresql.org/mailman.../slony1-general

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com