From: Scott Marlowe <scott.marlowe@gmail.com>
To: Tom Davies <tgdavies@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Backup of live database
Date: Wed, 16 Jan 2008 17:27:34 -0600
Message-ID: <dcc563d10801161527s39b3e3adm566357813f4b9a13@mail.gmail.com> (raw)
In-Reply-To: <A8B80B59-2685-4FDA-9A1C-08753CED7948@gmail.com>
References: <5a9699850801152257g6ee9513i6c4fc88a5f20a785@mail.gmail.com>
<478DAC1D.3010909@commandprompt.com>
<5a9699850801152310g39fa9bf3y3926892145ab3dcf@mail.gmail.com>
<478DBAC3.8050802@commandprompt.com>
<5a9699850801160024y7abdcd2fjdb1035c2070797eb@mail.gmail.com>
<478E4214.6030805@jobflash.com>
<A8B80B59-2685-4FDA-9A1C-08753CED7948@gmail.com>
On Jan 16, 2008 4:56 PM, Tom Davies <tgdavies@gmail.com> wrote:
>
> On 17/01/2008, at 4:42 AM, Tom Arthurs wrote:
> > The important thing is to start archiving the WAL files *prior* to
> > the first OS backup, or you will end up with an unusable data base.
>
> Why does the recovery need WAL files from before the backup?
It's a timeline thing. The database is coherent at time x1. The wal
file started at point x0 and moving forward, at some point, matches
up. You run the start_archive command which tells pgsql you're
starting your backup at point x1. You start the backup. You now have
a backup of the pgsql datastore that's a mix of what you had at x1
when you started, and x2 where you stopped.
You apply the WAL from x0 forward to, say x3., and it conveniently
rewrites the datastore to be coherent. If your WAL was from some
point between x1 and x2 you might have some data in the database that
the WAL file wouldn't write over, but was incoherent in regards to
what you'd get from point x3. So, some pages now are out of date,
because your WAL file isn't old enough.
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: scott.marlowe@gmail.com, tgdavies@gmail.com
Subject: Re: Backup of live database
In-Reply-To: <dcc563d10801161527s39b3e3adm566357813f4b9a13@mail.gmail.com>
* 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