On 10/03/2012 12:35 AM, Khizer wrote:
> I am doing streaming replication master-slave with
> postgresql-9.0.4 , i am getting following err
> how do i correct this
In order for replication to work, the WAL segments necessary for a slave
to "catch up" must be available long enough for them to do so. What this
error means, is that the slave requested the next WAL segment it needs,
but the master server had already recycled it. Either by sending it
elsewhere via archive_command, or by deleting it because it was no
longer needed.
You're going to have to rebuild your slave, unless you can supply it
with those missing WAL files.
One way to avoid this is to increase wal_keep_segments to a higher
number so slaves can lag behind for longer periods of time, without
needing to be rebuilt. You should also make sure you have
archive_command set, and always back up your old WAL transaction logs,
so you can reuse them in cases like this, or for emergency recovery from
the backups you're making on a regular basis.
So:
1. Rebuild your slave.
2. Increase wal_keep_segments on the master. Start at 500, but try to
set it up so there's at least enough for the slave to fall behind by an
hour and still able to catch up.
3. Make sure archive_command is set, and regularly back-up / cycle these
files for later use in recovery / standby.
--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-444-8534
sthomas@optionshouse.com
______________________________________________
See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email