From: | Pallav Kalva <pkalva(at)livedatagroup(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Archive Command Configuration |
Date: | 2006-03-23 19:56:48 |
Message-ID: | 4422FD80.5080009@livedatagroup.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi,
I am in the process of implementing Failover to our production
database. Inorder to able to restore to the last archive log, I have
cron job from the production database that runs every 5-10min to check
if there are any new archive logs and copy new archive logs to the
remote stand by failover machine.
The problem with this scenario is that there might be a possibility
that I might scp a partially filled archive log over to the remote
machine on a heavily updated databases with batch jobs runnings most of
the time like ours.
So, inorder to over come this we want to change the archive_command to
archive_command = 'cp %p /archives-temp/%f && mv /archives-temp/%f
/archives/%f'
( I could do remote copy also with the command but I dont want to go
that route because of network problems. )
With this command the archive log files are first copied to a
temporary location and then moved over to the actual location to which I
can point my cron job and do the scp to remote location every 5-10 min.
I tried with this command on a test machine and made sure that the
logs are moved over from archive-temp to archives directory, it works.
My question is there any problem in using this approach ? will I run
into problems in the future ? are there any other better ways of solving
this problem ?
postgresql version is 8.0.2.
Thanks!
Pallav.
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Crawford | 2006-03-23 20:28:41 | Re: Archive Command Configuration |
Previous Message | Sriram Dandapani | 2006-03-23 19:16:31 | Re: Re out of memory error with large insert |