Fri Jul 8 08:27:36 PDT 2005
- Previous message: [Slony1-general] ERROR: cache lookup failed for relation 438095645
- Next message: [Slony1-general] How can we replicate data of master table to slave table without affecting currently existing slave table rows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have a question about namespace . Please help me! Thank you very much !
I exec shell script : setCluster.sh
#shell script start---------------------------------------------------------------
#!/bin/sh
CLUSTERNAME=test1
MASTERDBNAME=test
MASTERPORT=8432
SLAVEDBNAME=test
SLAVEPORT=9432
MASTERHOST=10.10.10.67
SLAVEHOST=10.10.10.67
REPLICATIONUSER=master
PGBENCHUSER=slave
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_
#shell script end---------------------------------------------------------------
first , because of master have no user slave exec is failed.
at master : I exec
drop schema "_test1" cascade
drop table history ;
at slave : I exec
pg_dump -U slave -h 10.10.10.67 -p 9432 -t history test | psql -s -U master -h 10.10.10.67 -p 8432 test
then , at master I exec setCluster.sh second.
show errors:
<stdin>:50: Error: namespace "_test1" already exists in database of node 2
at slave :
psql test
exec drop schema "_test1" cascade
show errors:
ERROR: schema "_test1" does not exist
first error tell me: node 2 (slave) is exist.
but when i want to drop , it show errors.
where is the namespace ?how to find it ? and how to resolve this question,please give me some tips. Thanks very much !
---------------------------------
DO YOU YAHOO!?
????G???No.1??????????
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gborg.postgresql.org/pipermail/slony1-general/attachments/20050708/70dafd79/attachment.html
- Previous message: [Slony1-general] ERROR: cache lookup failed for relation 438095645
- Next message: [Slony1-general] How can we replicate data of master table to slave table without affecting currently existing slave table rows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list