scheduled switchover - Mailing list pgsql-admin

From francois pascual
Subject scheduled switchover
Date
Msg-id AANLkTimZZCX1dW9fM6FCjqy0qN_O_SkO10RswHOjp35y@mail.gmail.com
Whole thread Raw
Responses Do I need to run pgagent_upgrade.sql? If so, when?  ("Rob Richardson" <Rob.Richardson@rad-con.com>)
List pgsql-admin
Hi,
 
I use potgresSQL 8.5 with replication. The primary host and slave host are not in the same place. The bandwidth between master/host is to 10MB. We need to schedule a switchover and I found a solution to use the minimun of bandwith to rebuild the database slave
I want to know if somebody use similar procedure?
 
Step 1:
  Stop host01 (master)
Step 2:
  Stop host02 (slave) and start it with master configuration.
Step 3:
  build replication on host01 (old_master)
Step 4:
  Allow connexion on host02 (INSERT, DELETE, SELECT...)
Step 5:
  Stop host02 (master)
Step 6:
  Stop host01 (slave) and start it with master configuration.
Step 7:
  Build slave on host02 (old_master)
Step 8:
   Allow connexion on host01 (master)
 END.
 
I my case when i build slave host (step 3 and step 4), I use this following command:
rsync -av --rsh=ssh --compress --verbose --progress --exclude base --exclude pg_xlog --exclude pg_log --exclude postgresql.conf --exclude pg_hba.conf --exclude postmaster.pid * IP:/home/PGDDATA
 
I have add "--excluse base" on rsync.
 
If it's work it's only for the switchover, not when the master host crash.
 
 
Regards,
François
 
 
 
 
 

pgsql-admin by date:

Previous
From: Alejandro Brust at federacion
Date:
Subject: saludos y consulta
Next
From: "Rob Richardson"
Date:
Subject: Do I need to run pgagent_upgrade.sql? If so, when?