Thu Mar 24 09:41:07 PST 2005
- Previous message: [Slony1-general] [Patch] New spec
- Next message: [Slony1-general] Urgent Replication HELP
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I?m try to use master-slave replication and i have some problems with slony 1.05 e postgres 8.01 Script master #!/bin/sh slonik << _END_ cluster name=teste; node 1 admin conninfo = 'dbname=TESTE host=localhost port=5432 user=postgres'; node 2 admin conninfo = 'dbname=TESTE host=192.168.0.244 port=5432 user=postgres'; init cluster (id=1,comment='Master Node'); #table add key (node id=1, fully qualified name ='public.cliente'); the table cliente already has a primary key and the slony saids that is false create set (id=1, origin=1, comment='All test tables'); set add table (set id=1, origin=1, id=1, fully qualified name = 'cliente', comment='tabela cliente'); set add table (set id=1, origin=1, id=1, fully qualified name = 'tipo', comment='tabela tipo'); create set (id=2, origin=2, comment='All testslave tables'); set add table (set id=2, origin=2, id=1, fully qualified name = 'cliente', comment='tabela cliente'); set add table (set id=2, origin=2, id=1, fully qualified name = 'tipo', comment='tabela tipo'); store node (id=2, comment='N?2'); store path (server=1, client=2, conninfo='dbname=TESTE host=192.168.0.244 port=5432 user=postgres'); store listen (origin=1, receiver=2, provider=1); _END_ and result of slon $CLUSTERNAME "dbname=$MASTERDBNAME user=$REPLICATIONUSER host=$MASTERHOST" CONFIG main: slon version 1.0.5 starting up CONFIG main: local node id = 1 CONFIG main: loading current cluster configuration CONFIG storeSet: set_id=1 set_origin=1 set_comment='All pgbench tables' CONFIG main: configuration complete - starting threads Script slave #!/bin/sh slonik <<_EOF_ # ---- # This defines which namespace the replication system uses # ---- cluster name = $CLUSTERNAME; # ---- # Admin conninfo's are used by the slonik program to connect # to the node databases. So these are the PQconnectdb arguments # that connect from the administrators workstation (where # slonik is executed). # ---- node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST user=$REPLICATIONUSER'; node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST user=$REPLICATIONUSER'; # ---- # Node 2 subscribes set 1 # ---- subscribe set ( id = 1, provider = 1, receiver = 2, forward = no); _EOF_ The result ERROR cannot get sl_local_node_id - ERROR: schema "_TESTE" does not exist FATAL main: Node is not initialized properly What went wrong? I just copy this script from http://gborg.postgresql.org/project/slony1/genpage.php?howto_basic I try to add an init cluster to the slave using the following line init cluster (id=2,comment='Master Node'); but it returns another error. <stdin>:9: ERROR: syntax error at or near init Thks in advance Ricardo Silva Ferreira ricardo.silva at cimsoft.pt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://gborg.postgresql.org/pipermail/slony1-general/attachments/20050324/26fee9e3/attachment.html
- Previous message: [Slony1-general] [Patch] New spec
- Next message: [Slony1-general] Urgent Replication HELP
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list