Mon Aug 4 01:27:28 PDT 2008
- Previous message: [Slony1-general] How to add more slaves to an existing replication set
- Next message: [Slony1-general] how to determine if the slave is caught up/in sync with the master
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 kevin kempter a écrit : > Hi All; > > I setup a single master & slave like this: > > - I did a pg_dump from the master to the slave > > - set the cluster name > > - init cluster ( id=1, comment = 'Master Node'); > > - create set ( id=1, origin=1, comment = 'PA REPLICATION SET' ); > > - ran all the 'set add table' commands > > - store node (id=2, comment = 'Slave Node 1'); > > - store path (server = 1, client = 2, conninfo='dbname=$MASTERDBNAME > host=$MASTERHOST port=$MASTERPORT user=$REPUSER'); > > - store path (server = 2, client = 1, conninfo='dbname=$SLAVEDBNAME > host=$SLAVEHOST port=$SLAVEPORT user=$REPUSER'); > > - store listen (origin=1, provider = 1, receiver =2); > > - store listen (origin=2, provider = 2, receiver =1); > > - started the slon daemon on the master: > slon $CLUSTERNAME "dbname=$MASTERDBNAME port=$MASTERPORT > host=$MASTERHOST user=$REPUSER" > ./slon.master.log 2>&1 & > > - started the slon daemon on the slave > > - subscribe set ( id = 1, provider = 1, receiver = 2, forward = no); > > > Now I want to add 2 more slaves, I plan to run this: > > - do a pg_dump from the master to slaves 3 & 4 > > - store node (id=3, comment = 'Slave Node 2'); > > - store node (id=4, comment = 'Slave Node 3'); > > - store path (server = 1, client = 3, conninfo='dbname=$MASTERDBNAME > host=$MASTERHOST port=$MASTERPORT user=$REPUSER'); > > - store path (server = 3, client = 1, conninfo='dbname=$SLAVEDBNAME > host=$SLAVEHOST port=$SLAVEPORT user=$REPUSER'); > > - store path (server = 1, client = 4, conninfo='dbname=$MASTERDBNAME > host=$MASTERHOST port=$MASTERPORT user=$REPUSER'); > > - store path (server = 4, client = 1, conninfo='dbname=$SLAVEDBNAME > host=$SLAVEHOST port=$SLAVEPORT user=$REPUSER'); > > - store listen (origin=1, provider = 1, receiver =3); > > - store listen (origin=3, provider = 3, receiver =1); > > - store listen (origin=1, provider = 1, receiver =4); > > - store listen (origin=4, provider = 4, receiver =1); > > - Start the slon daemon on slaves 3 & 4 > > - subscribe set ( id = 1, provider = 1, receiver = 3, forward = no); > > - subscribe set ( id = 1, provider = 1, receiver = 4, forward = no); > > > > Is this correct, or am I missing something here? > > > Thanks in advance > > /Kevin Hi, When pg_dumping master to create the 2 new slaves, be aware to get rid of slony information on the dump. Otherwise, make sure you drop every slony specific thing on new slaves before trying to execute the store node. You may, for instance do something like "select _/replication_cluster_name/.uninstallnode();" which will drop slony triggers and restore normal tables constraints and triggers, if appliable. You can then do a "drop schema _/replication_cluster_name/ cascade ;". What's more, you don't need store listen anymore. It is done by store path. Be aware that with the so defined paths, node 2, 3 and 4 won't see each other. Regards, - -- Stéphane Schildknecht PostgreSQLFr : http://www.postgresql.fr Venez nous rencontrer le 4 octobre lors du plus important événement PostgreSQL francophone : http://www.pgday.fr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIlr1wA+REPKWGI0ERAvPhAKC9JCB0xZBuYbDt8Q11dUOJunckeACeKR5k plnRV5lNUJu8Y0yNaAZZQVY= =E4JM -----END PGP SIGNATURE-----
- Previous message: [Slony1-general] How to add more slaves to an existing replication set
- Next message: [Slony1-general] how to determine if the slave is caught up/in sync with the master
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list