Tue Mar 1 11:29:47 PST 2005
- Next message: [Slony1-general] candidate key question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 28 Feb 2005 12:38:57 +0100, Roberto Cesar Najera <rob at rtp.gob.mx> wrote: > Perdon por la ignorancia > >>Revisa la llamada de slon al nodo esclavo. > >>Yo prob? el ejemplo y s? me funcion? > como tendria que ser la llamada ? > slon $CLUSTER "dbname=$MASTERDBNAME user=$SLONY_USER slon $CLUSTER "dbname=$SLAVEDBNAME user=$SLONY_USER No tengo ninguna bitacora, ?nicamente segu? las instrucciones del documento de instalaci?n. ----- Original Message ----- > From: "Juanky Moral" <juanky.moral at gmail.com> > To: "Roberto Cesar Najera" <rob at rtp.gob.mx> > Cc: <> > Sent: Friday, February 18, 2005 6:52 PM > Subject: Re: [Slony1-general] configuracion > > > On Wed, 16 Feb 2005 17:49:13 +0100, Roberto Cesar Najera <rob at rtp.gob.mx> > wrote: > > > tengo los siguienes parametros > > > > > > export CLUSTERNAME=slony_example > > > export MASTERDBNAME=pgbench > > > export SLAVEDBNAME=pgbenchslave > > > export MASTERHOST=localhost > > > export SLAVEHOST=localhost > > > export REPLICATIONUSER=pgsql > > > export PGBENCHUSER=pgbench > > > > > > #creo la Bd Maestra > > > createdb -O $PGBENCHUSER -h $SLAVEHOST $SLAVEDBNAME > > > > > > # creo la Bd Sclavo > > > createdb -O $PGBENCHUSER -h $SLAVEHOST $SLAVEDBNAME > > > > > > #creo el lenguage plpgsql > > > createlang plpgsql -h $MASTERHOST $MASTERDBNAME > > > > > > #esta parte no se para que es > > > > > > pgbench -i -s 1 -U $PGBENCHUSER -h $MASTERHOST $MASTERDBNAME > > Es para lanzar pgbench sobre la bd $MASTERDBNAME. Eso simula una bd en > > estado de producci?n, es decir, una bd a la que est?n accediendo > > varios usuarios realizando muchas transacciones. > > > > > > #copio la estrucutra y los datos a la bd scalvo > > > pg_dump -s -U $REPLICATIONUSER -h $MASTERHOST $MASTERDBNAME | psql -U > > > $REPLICATIONUSER -h $SLAVEHOST $SLAVEDBNAME > > > > > > # ejecuto > > > slon $CLUSTERNAME "dbname=$MASTERDBNAME user=$REPLICATIONUSER > > > host=$MASTERHOST" > > > > > > #ejecuto > > > slon $CLUSTER "dbname=$DBNAME1 user=$SLONY_USER" > > ?de d?nde sale $DBNAME1? ?aqu? no deber?as pones dbname=$SLAVEDBNAME? > > > > > > creo un script > > > #!/bin/sh > > > > > > slonik <<_EOF_ > > > #-- > > > # define the namespace the replication system uses in our example it > is > > > # slony_example > > > #-- > > > cluster name = $CLUSTERNAME; > > > > > > #-- > > > # admin conninfo's are used by slonik to connect to the nodes one > for > > > each > > > # node on each side of the cluster, the syntax is that of > PQconnectdb in > > > # the C-API > > > # -- > > > node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST > > > user=$REPLICATIONUSER'; > > > node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST > > > user=$REPLICATIONUSER'; > > > > > > #-- > > > # init the first node. Its id MUST be 1. This creates the schema > > > # _$CLUSTERNAME containing all replication system specific database > > > # objects. > > > > > > #-- > > > init cluster ( id=1, comment = 'Master Node'); > > > > > > #-- > > > # Because the history table does not have a primary key or other > unique > > > # constraint that could be used to identify a row, we need to add > one. > > > # The following command adds a bigint column named > > > # _Slony-I_$CLUSTERNAME_rowID to the table. It will have a default > > > value > > > # of nextval('_$CLUSTERNAME.s1_rowid_seq'), and have UNIQUE and NOT > NULL > > > # constraints applied. All existing rows will be initialized with a > > > # number > > > #-- > > > table add key (node id = 1, fully qualified name = > > > 'public.history'); > > > > > > #-- > > > # Slony-I organizes tables into sets. The smallest unit a node can > > > # subscribe is a set. The following commands create one set > containing > > > # all 4 pgbench tables. The master or origin of the set is node 1. > > > #-- > > > create set (id=1, origin=1, comment='All pgbench tables'); > > > set add table (set id=1, origin=1, id=1, fully qualified name = > > > 'public.accounts', comment='accounts table'); > > > set add table (set id=1, origin=1, id=2, fully qualified name = > > > 'public.branches', comment='branches table'); > > > set add table (set id=1, origin=1, id=3, fully qualified name = > > > 'public.tellers', comment='tellers table'); > > > set add table (set id=1, origin=1, id=4, fully qualified name = > > > 'public.history', comment='history table', key = serial); > > > > > > #-- > > > # Create the second node (the slave) tell the 2 nodes how to connect > to > > > # each other and how they should listen for events. > > > #-- > > > > > > store node (id=2, comment = 'Slave node'); > > > store path (server = 1, client = 2, > conninfo='dbname=$MASTERDBNAME > > > host=$MASTERHOST user=$REPLICATIONUSER'); > > > store path (server = 2, client = 1, > conninfo='dbname=$SLAVEDBNAME > > > host=$SLAVEHOST user=$REPLICATIONUSER'); > > > store listen (origin=1, provider = 1, receiver =2); > > > store listen (origin=2, provider = 2, receiver =1); > > > _EOF_ > > > > > > corro el script > > > > > > ./slonik.sh > > > > > > y no tengo problemas > > > > > > el problema es cuando ejecuto el > > > #!/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_ > > > > > > me marca > > > > > > WARN remoteWorkerThread_1: transactions earlier than XID 1848303 are > still > > > in progress > > > WARN remoteWorkerThread_1: data copy for set 1 failed - sleep 60 > > > seconds > > > > > > Alguien me puede ayudar > > Revisa la llamada de slon al nodo esclavo. > > Yo prob? el ejemplo y s? me funcion?. > > > > > > > > Saludos > > > > > > _______________________________________________ > > > Slony1-general mailing list > > > Slony1-general at gborg.postgresql.org > > > http://gborg.postgresql.org/mailman/listinfo/slony1-general > > > > > > > > > -- > > Juanky Moral > > "Tendr? que moverme m?s r?pido: el horizonte brilla el?ctrico." > > (Horizonte El?ctrico - www.losdeltonos.com ) > > -- Juanky Moral "Tendr? que moverme m?s r?pido: el horizonte brilla el?ctrico." (Horizonte El?ctrico - www.losdeltonos.com )
- Next message: [Slony1-general] candidate key question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list