Home > Archive > Slony1 PostgreSQL Replication > July 2005 > about SlonyI namespace question









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 about SlonyI namespace question
Sun.betty

2005-07-08, 3:24 am


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=mast
er
PGBENCHUSER=slave
export CLUSTERNAME MASTERDBNAME MASTERPORT SLAVEDBNAME SLAVEPORT MASTERHOST SLAVEHOST REPLICATIONUSER PGBENCHUSER

slonik <<_EOF_
cluster name = $CLUSTERNAME;

node 1 admin conninfo = 'dbname=$MASTERDBNAM
E host=$MASTERHOST user=$REPLICATIONUSE
R';
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=$MA
STERDBNAME host=$MASTERHOST user=$REPLICATIONUSE
R');
store path (server = 2, client = 1, conninfo='dbname=$SL
AVEDBNAME 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µÄ·À¶¾·ÀÀ¬»ø³¬´óÓÊÏ
ä
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