database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Q&A 7558 게시물 읽기
No. 7558
8.3버젼에 slony-I설치 해보신분!!
작성자
서정주(moreta)
작성일
2008-11-13 14:49
조회수
6,421

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일째삽질중....

이 글에 대한 댓글이 총 1건 있습니다.

자답이 되네요


2.0메뉴얼에 왜 1.2때의 예제를 올려놓는지...


안나와있어서 한참뒤졌네요


store node (id=2, comment = 'Slave node');



store node (id=2, event node=1, comment = 'Slave node');

를 추가해 주시면 됩니다.

서정주(moreta)님이 2008-11-14 10:50에 작성한 댓글입니다.
[Top]
No.
제목
작성자
작성일
조회
7561Postgresq과 mysql 함께 사용 [3]
한재희
2008-11-18
6012
7560pg_dump와 query를 이용한 덤프방법?? [1]
이근수
2008-11-17
6963
7559create type으로 생성후 해당내용조회하는 방법좀 알려주세요 [1]
노지석
2008-11-13
6572
75588.3버젼에 slony-I설치 해보신분!! [1]
서정주
2008-11-13
6421
7557설치후 에러 메세지와 실행 관련 해서 질문좀 드릴게요. [2]
최훈
2008-11-13
9995
7556접속 비밀번호에 대해서.. [1]
관식
2008-11-12
6606
7555외래키와 트리거에 대해 질문 드리겠습니다. [4]
김하늘
2008-11-11
6678
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.021초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다