Tue Jun 2 20:50:16 PDT 2009
- Previous message: [Slony1-general] How to shut-down slony replication
- Next message: [Slony1-general] How to shut-down slony replication
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Melvin thank for the reply. Kindly tell me what do you mean by "temporarily stopping replication"? Secondly can you give me a sample of how to use pkill slon. Is it necessary to call "uninstall node" and "unsubscribe set" commands to stop replication? -Owais From: Melvin Davidson [mailto:melvin6925 at yahoo.com] Sent: Tuesday, June 02, 2009 7:18 PM To: slony1-general at lists.slony.info; owais Subject: Re: [Slony1-general] How to shut-down slony replication To temporarily stop replication, I issue pkill slon on the master and all slave. To toggle a master and slave, I use a slonik script like one below: =========================================================== slonik <<_EOF_ #-- # define the namespace the replication system uses in our example it is # slony_example #-- CLUSTER NAME = $PTS_META_REP; #-- # 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 port=$PGPORT user=$REPLICATIONUSER'; node 101 admin conninfo='dbname=$MASTERDBNAME host=$SLAVEHOST1 port=$JCIPORT user=$REPLICATIONUSER'; # ---- # Switchover to node 101, make node 1 the slave # ---- lock set (id = 1, origin = 1); wait for event (origin = 1, confirmed = 101); move set (id = 1, old origin = 1, new origin = 101); wait for event (origin = 1, confirmed = 101); _EOF_ =========================================================== Likewise to switch back, I use: =========================================================== slonik <<_EOF_ #-- # define the namespace the replication system uses in our example it is # slony_example #-- CLUSTER NAME = $PTS_META_REP; #-- # 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 port=$PGPORT user=$REPLICATIONUSER'; node 101 admin conninfo='dbname=$MASTERDBNAME host=$SLAVEHOST1 port=$JCIPORT user=$REPLICATIONUSER'; # ---- # Switchover to node 1, make node 101 the slave # ---- lock set (id = 1, origin = 101); wait for event (origin = 101, confirmed = 1); move set (id = 1, old origin = 101, new origin = 1); wait for event (origin = 101, confirmed = 1); _EOF_ =========================================================== Melvin Davidson --- On Tue, 6/2/09, owais <owais at preceptglobalaccess.com> wrote: From: owais <owais at preceptglobalaccess.com> Subject: [Slony1-general] How to shut-down slony replication To: slony1-general at lists.slony.info Date: Tuesday, June 2, 2009, 7:17 AM Hi guys, I just start looking in to slony1 project. The project has impressed me a lot. I have successfully manage to start the replication between two databases (one the same machine). I have used the following article to setup slony replication ( <http://www.linuxjournal.com/article/7834> http://www.linuxjournal.com/article/7834). Now, I have the following questions: 1) What is the procedure to stop replication process? Can anyone present me a sample shell script? 2) Is it possible to toggle master and slave? I only have 1 master database and 1 slave. Can I change slave to master? -Regards Owais -----Inline Attachment Follows----- _______________________________________________ Slony1-general mailing list Slony1-general at lists.slony.info <http://lists.slony.info/mailman/listinfo/slony1-general> http://lists.slony.info/mailman/listinfo/slony1-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.slony.info/pipermail/slony1-general/attachments/20090603/191cef9b/attachment.htm
- Previous message: [Slony1-general] How to shut-down slony replication
- Next message: [Slony1-general] How to shut-down slony replication
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list