switchover in postgresql

Posted by user1010280 on Server Fault See other posts from Server Fault or by user1010280
Published on 2011-11-30T03:55:57Z Indexed on 2011/12/01 10:00 UTC
Read the original article Hit count: 257

Filed under:
|
|

I am using Postgresql 9.0 with Streaming replication. So, during switchover I follow these steps:-

  1. Get the server timestamp on primary.
  2. Get the current log position on primary.
  3. Set Verify Log location
  4. Verify Transaction Received Location
  5. Shutdown DB on production.
  6. Synchronize the transaction logs from PR to DR.
  7. Trigger a failover on the DR Database by creating the trigger file specified in recovery.conf
  8. Verify DB Mode on DR
  9. Copy the control file from from DR to primary.
  10. copy the temporary stats file from DR to primary.
  11. copy the history file from DR to primary.
  12. Create recovery.conf file.
  13. Start Database in standby mode in primary.
  14. Verify DB mode on PR

At step (6), I have to copy last wal generated on Primary to standby and sync both PR and standby. but this thing takes time to copy files because this remote. So that postgres will keep seraching for wal for long time and after that it stops the server.

So I want to know is there any way so that I can ask postgres to stop seraching or locating WAL after shutdown??? because postgres tries to locate this wal every 5 seconds.

Please reply as soon as possible..its urgent...

© Server Fault or respective owner

Related posts about java

Related posts about linux