From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Colin Wilson <cwilson@blackducksoftware.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Warm Standby looking for already applied log files
Date: Mon, 24 Jan 2011 11:02:42 -0600
Message-ID: <4D3D5C520200002500039B11@gw.wicourts.gov> (raw)
In-Reply-To: <A51C2757-6A50-4E0A-B1C9-6E07CD4393A9@blackducksoftware.com>
References: <A51C2757-6A50-4E0A-B1C9-6E07CD4393A9@blackducksoftware.com>
Colin Wilson <cwilson@blackducksoftware.com> wrote:
> Once the server was back up we noticed the xlog file it was
> looking for was one that the logs say was already applied. It
> was 7 xlogs back to be exact.
It is not unusual for WAL replay to ask for files out of order or
multiple times in certain circumstances. A standby could never hope
to keep up with a busy master if it waited for a disk flush on every
WAL file before requesting the next, so recovery is one of those
times where it has to go back and ask for files containing data
which wasn't flushed to disk.
> We have our log shipping target replay the xlogs and then delete
> them when it is done
Not a good idea.
> how to get the system to start applying the logs we have?
Since you don't know how much of what it applied the first time
actually made it to disk, I wouldn't trust any recovery attempt.
Time to grab a new base backup from the master, I think. And fix
that script to not delete. Personally, I like to keep the last two
base backups and all the WAL files needed to restore from the
earlier of those forward. We have cleanup script that deletes the
oldest backup and WAL files only needed for recovery from it when we
receive a new one.
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, cwilson@blackducksoftware.com
Subject: Re: Warm Standby looking for already applied log files
In-Reply-To: <4D3D5C520200002500039B11@gw.wicourts.gov>
References: <A51C2757-6A50-4E0A-B1C9-6E07CD4393A9@blackducksoftware.com> <4D3D5C520200002500039B11@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox