PostgreSQL - Consulta acerca de slony-i

   
Vista:

Consulta acerca de slony-i

Publicado por jaison gonzalez (1 intervención) el 10/01/2008 23:26:03
Hola ,
cómo están? me llamo Jaison González y la verdad estoy interesado en saber un poco mas acerca de slony-i, he leido info pero aun asi tengo algunos inconvenientes.. mira esto es lo que he hecho:

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 programaPostgreSQL8.2in>initdb -D "C:Cluster_3" -U root -W
It showed somethings, and assigned the password

C:Archivos de programaPostgreSQL8.2in>pg_ctl register -N "PostgresCL_3" -Uroot -P root -D "C:Cluster_3"
Worked out well

C:Archivos de programaPostgreSQL8.2in>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=Cluster_10;

node 1 admin conninfo = 'dbname=DB_Cluster_1 host= 127.0.0.1 user=root password=root port=5435';
node 2 admin conninfo = 'dbname=DB_Cluster_2 host=127.0.0.1 user=root password=root port=5436';
node 3 admin conninfo = 'dbname=DB_Cluster_3 host=127.0.0.1 user=root password=root port=5437';

init cluster (id=1, comment='Nodo maestro');

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

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

store node (id=2, comment='Nodo esclavo Cluster_2');
store node (id=3, comment='Nodo esclavo Cluster_3');

store path (server=1, client=1, conninfo='dbname=DB_Cluster_1 host=127.0.0.1 user=root password=root port=5435');
store path (server=1, client=2, conninfo='dbname=DB_Cluster_2 host=127.0.0.1 user=root password=root port=5436');
store path (server=1, client=3, conninfo='dbname=DB_Cluster_3 host=127.0.0.1 user=root password=root port=5437');
store listen (origin=1, provider=1, receiver=2);
store listen (origin=2, provider=2, receiver=1);
store listen (origin=3, provider=3, receiver=1);

If I leave the script like that it says:

C:Archivos de programaPostgreSQL8.2in>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=1, origin=1, id=2, fully qualified name='public.Personas', comment='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 programaPostgreSQL8.2in>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)=(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…

agadeceria enormenete si me pudieras hechar una mano...
--
Jaison J. González Chaux
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder