2014-05-19 15 views
0

標題:slony-i複製不起作用。Postgre 9.3/slony 2.2.0/window上的Slony-i複製7

二進制路徑:C:\Program Files\PostgreSQL\9.3\share

Master.txt

cluster name = testing; 

node 1 admin conninfo = 'dbname=original host=localhost user=postgres password=sa'; 
node 2 admin conninfo = 'dbname=copy host=localhost user=postgres password=sa'; 

init cluster (id = 1,comment = 'Node 1 - Master'); 
create set (id = 1, origin = 1); 

set add table (set id = 1,origin = 1,id = 1 , full qualified name = 'public.test'); 
store node(id = 2,event node = 1,comment = 'slave'); 

store path(server = 1,client = 2,conninfo = 'dbname=original host=localhost user=postgres password=sa'); 
store path(server = 2,client = 1,conninfo = 'dbname=copy host=localhost user=postgres password=sa'); 

Slave.txt

CLUSTER NAME = testing; 

node 1 admin conninfo = 'dbname=original host=localhost port=5432 user=postgres password=sa'; 
node 2 admin conninfo = 'dbname=copy host=localhost port=5432 user=postgres password=sa'; 

subscribe set (id = 1,provider = 1, receiver = 2, forward = no); 

錯誤

Error

問題

不斷等待事件,當我測試複製不工作,甚至出現癱瘓複製。

感謝您

回答

0

您需要創建主機和從機上Slony聚服務。

創建一個文件並將其命名與內容slon.conf:

cluster_name=testing 

conn_info = 'dbname = original host = localhost user = postgres password = sa port = 5432' 

然後,轉到命令提示符,頭向Postgres的bin文件夾,然後鍵入:

slon -regservice Slony-I 

slon -addengine Slony-I slon.conf 

slon -listengines Slony-I 

必須這樣做在主機和從機上