From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: restoring wal archive and pg_xlog dir
Date: Thu, 23 Jun 2005 14:59:20 -0400
Message-ID: <7527.1119553160@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.63.0506231137160.21285@discord.dyndns.org>
References: <Pine.LNX.4.63.0506231054250.21285@discord.dyndns.org>
<7197.1119551082@sss.pgh.pa.us>
<Pine.LNX.4.63.0506231137160.21285@discord.dyndns.org>
Jeff Frost <jeff@frostconsultingllc.com> writes:
> So, that, immediately begs the question as to why the docs indicate we
> should clear out all the files in the pg_xlog directory before
> beginning the restore? Wouldn't it be better to keep them in place?
IIRC, the docs recommend getting rid of any xlog files that were copied
as part of your base backup: they are either too old to be interesting
(if finished before the base backup started) or not to be trusted
because they might be incomplete (if they were actively being written
while the base backup proceeded). You have to get this range of data
from your archive in order to trust it.
The reason we avoid overwriting data automatically is that we don't know
what is in your local pg_xlog exactly; there might be xlog files that
are newer than the base backup and potentially contain data not
available anywhere else (if for some reason they never got copied to the
archive area). So prudence dictates not wiping them out.
> Ohhhh...I guess I misunderstood the meaning of base backup. So, what I really
> need if my .backup file is named: 000000010000000500000051.00FB6C60.backup,
> then I need at least the following to do a restore:
> pg_xlog/000000010000000500000051
> PGDATA base backup
> and then any archived wal files that come after 51?
You got it.
regards, tom lane
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: tgl@sss.pgh.pa.us, jeff@frostconsultingllc.com
Subject: Re: restoring wal archive and pg_xlog dir
In-Reply-To: <7527.1119553160@sss.pgh.pa.us>
References: <Pine.LNX.4.63.0506231054250.21285@discord.dyndns.org> <7197.1119551082@sss.pgh.pa.us> <Pine.LNX.4.63.0506231137160.21285@discord.dyndns.org> <7527.1119553160@sss.pgh.pa.us>
* 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