Jaison J. González Chaux g0chman at gmail.com
Thu Jan 10 14:23:42 PST 2008
Hi,

Good evening, my name is Jaison Gonz=E1lez and I am very interested in know=
ing
a bit more about slony-I, I have read some info found on your web about
slony, because I have to install it and make it for academic purposes.

What have I done:

1. Installed postgres 8.2.

2. Installed slony by default on postgres 8.2. (have already proven that it
is working).

3. Created three cluster in different ports.
    I used this:

C:\Archivos de programa\PostgreSQL\8.2\bin>initdb -D "C:\Cluster_3" -U root
-W
  It showed somethings, and assigned the password

C:\Archivos de programa\PostgreSQL\8.2\bin>pg_ctl register -N "PostgresCL_3"
-Uroot -P root -D "C:\Cluster_3"
 Worked out well

C:\Archivos de programa\PostgreSQL\8.2\bin>psql -Uroot -dDB_Cluster_3 -p5437
 Worked out well

4. Assigned the plpgsql language to the databases.

5. Changed the xxid.sql to xxid.v80.sql

6. Tried to configure the cluster name, nodes and stuffs like that, this is
what I put:

cluster name=3DCluster_10;

node 1 admin conninfo =3D 'dbname=3DDB_Cluster_1 host=3D 127.0.0.1 user=3Dr=
oot
password=3Droot port=3D5435';
node 2 admin conninfo =3D 'dbname=3DDB_Cluster_2 host=3D127.0.0.1 user=3Dro=
ot
password=3Droot port=3D5436';
node 3 admin conninfo =3D 'dbname=3DDB_Cluster_3 host=3D127.0.0.1 user=3Dro=
ot
password=3Droot port=3D5437';

init cluster (id=3D1, comment=3D'Nodo maestro');

create set (id=3D1, origin=3D1, comment=3D'aqui van todas mis tablas');

set add table (set id=3D1, origin=3D1, id=3D1, fully qualified name=3D'
public.Personas', comment=3D'tabla de Personas del Cluster_1');
set add table (set id=3D1, origin=3D1, id=3D2, fully qualified name=3D'
public.Personas', comment=3D'tabla de Personas del Cluster_2');
set add table (set id=3D1, origin=3D1, id=3D3, fully qualified name=3D'
public.Personas', comment=3D'tabla de Personas del Cluster_3');

store node (id=3D2, comment=3D'Nodo esclavo Cluster_2');
store node (id=3D3, comment=3D'Nodo esclavo Cluster_3');

store path (server=3D1, client=3D1, conninfo=3D'dbname=3DDB_Cluster_1
host=3D127.0.0.1user=3Droot password=3Droot port=3D5435');
store path (server=3D1, client=3D2, conninfo=3D'dbname=3DDB_Cluster_2
host=3D127.0.0.1user=3Droot password=3Droot port=3D5436');
store path (server=3D1, client=3D3, conninfo=3D'dbname=3DDB_Cluster_3
host=3D127.0.0.1user=3Droot password=3Droot port=3D5437');
   store listen (origin=3D1, provider=3D1, receiver=3D2);
   store listen (origin=3D2, provider=3D2, receiver=3D1);
   store listen (origin=3D3, provider=3D3, receiver=3D1);

If I leave the script like that it says:

C:\Archivos de programa\PostgreSQL\8.2\bin>slonik config.conf

config.conf:37: PGRES_FATAL_ERROR select "_Cluster_11".setAddTable(1, 2, '
public.Personas', 'Personas_pkey', 'tabla de Personas del Cluster_2');  -
ERROR:  duplicate key violates unique constraint "sl_table_tab_reloid_key"

CONTEXTO:  SQL statement "INSERT INTO "_Cluster_11".sl_table (tab_id,
tab_reloid, tab_relname, tab_nspname, tab_set, tab_idxname, tab_altered,
tab_comment) values ( $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 , false,  $7 )"

PL/pgSQL function "setaddtable_int" line 103 at SQL statement

SQL statement "SELECT  "_Cluster_11".setAddTable_int( $1 ,  $2 ,  $3 ,  $4 ,
$5 )"

PL/pgSQL function "setaddtable" line 37 at perform

 And I really dont know what it is, then I put that line on comments [#set
add table (set id=3D1, origin=3D1, id=3D2, fully qualified name=3D'public.P=
ersonas',
comment=3D'tabla de Personas del Cluster_2');] and the it happens the
samething with the following one

 Well the I decided to leave those two on comments, and then this appears:

C:\Archivos de programa\PostgreSQL\8.2\bin>slonik config.conf

config.conf:64: PGRES_FATAL_ERROR select "_Cluster_12".storeListen(2, 2, 1);


 -ERROR:  insert or update on table "sl_listen" violates foreign key
constraint "sl_listen-sl_path-ref"

DETALLE:  Key (li_provider,li_receiver)=3D(2,1) is not present in table
"sl_path".



CONTEXTO:  SQL statement "INSERT INTO "_Cluster_12".sl_listen (li_origin,
li_provider, li_receiver) values ( $1 ,  $2 ,  $3 )"

PL/pgSQL function "storelisten_int" line 36 at SQL statement

SQL statement "SELECT  "_Cluster_12".storeListen_int ( $1 ,  $2 ,  $3 )"

PL/pgSQL function "storelisten" line 6 at perform

 And I really don't know why, or well I know that it refers to the store
listen part but really don't know how to solve it out=85

 I do really appreciate any help or guidance.
Jaison J. Gonz=E1lez Chaux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20080110/=
a3fbbc84/attachment.htm


More information about the Slony1-general mailing list