slony1-2.0.0-rc1를 설치해서 하고 있는데요
메뉴얼의
2. Replicatiog Your First Database 를 보면서 하고 있습니다.
여기서 질문
예제로 사용되는 덤프는 pgbench를 사용해서 하는데요
메뉴얼에서 처음 나오는 shell script를 그대로 써서 성공하신분있나요? 아니면 수정해야하는게 맞는건지..
메뉴얼을 보면
One of the tables created by pgbench, history, does not have a primary key. In earlier versions of Slony-I, a slonik command called TABLE ADD KEY could be used to introduce one. This caused a number of problems, and so this feature has been removed in version 2 of Slony-I. It now requires that there is a suitable candidate primary key.
The following SQL requests will establish a proper primary key on this table:
psql -U $PGBENCH_USER -h $HOST1 -d $DBNAME1 -c "begin; alter table history add column id serial; update history set id = nextval('history_id_seq'); alter table history add primary key(id); commit"
이런내용이 있는데 그렇다면 쉘스크립트에서 (master.sh이라고 작성했습니다.)
table add key (node id = 1, fully qualified name = 'public.history');
이부분도 빼야하는거 아닌가요?
저는 이게 빠지는 게 맞다고 생각해서 저 부분을 삭제하고 스크립트를 돌렸는데요
SLONY_HOME/bin에서
./slonik <<_EOF_
cluster name = $CLUSTERNAME;
node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST port=$MASTERPORT user=$MASTERDBA';
node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST port=$SLAVEPORT user=$SLAVEDBA';
init cluster ( id=1, comment = 'Master Node');
create set (id=1, origin=1, comment='All pgbench tables');
set add table (set id=1, origin=1, id=1, fully qualified name = 'public.test', comment='test table');
store node (id=2, comment = 'Slave node');
store path (server = 1, client = 2, conninfo='dbname=$MASTERDBNAME host=$MASTERHOST port=$MASTERPORT user=$MASTERDBA');
store path (server = 2, client = 1, conninfo='dbname=$SLAVEDBNAME host=$SLAVEHOST port=$SLAVEPORT user=$SLAVEDBA');
store listen (origin=1, provider = 1, receiver =2);
store listen (origin=2, provider = 2, receiver =1);
_EOF_
돌렸더니
<stdin>:11: Error: require EVENT NODE
<stdin>:11: Error: No admin conninfo provided for node -1
이렇게 에러가 나옵니다. EVENT NODE는 어디가 넣어줘야하는건가요?
제가 잘못쓴게 있나요? 환경변수를 전부 제대로 지정해 주었습니다.
아... 쉬운게 하나도 없네요
그외에 8.3에 설치할 때는 이걸 주의해라 ! 라고 하는거 있으면 좀 알려주세요 2일째삽질중....
|