From: Steve Holdoway <steve.holdoway@firetrust.com>
To: pgsql-admin@postgresql.org
Subject: Re: Backup of live database
Date: Thu, 17 Jan 2008 07:55:36 +1300
Message-ID: <20080117075536.b03f6077.steve.holdoway@firetrust.com> (raw)
In-Reply-To: <23635.1200496752@sss.pgh.pa.us>
References: <5a9699850801152257g6ee9513i6c4fc88a5f20a785@mail.gmail.com>
<478DAC1D.3010909@commandprompt.com>
<5a9699850801152310g39fa9bf3y3926892145ab3dcf@mail.gmail.com>
<478DBAC3.8050802@commandprompt.com>
<5a9699850801160024y7abdcd2fjdb1035c2070797eb@mail.gmail.com>
<20080116233030.c1adbcb1.steve.holdoway@firetrust.com>
<23635.1200496752@sss.pgh.pa.us>
On Wed, 16 Jan 2008 10:19:12 -0500
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Steve Holdoway <steve.holdoway@firetrust.com> writes:
> > You can be absolutely certain that the tar backup of a file that's changed is a complete waste of time. Because it changed while you were copying it.
>
> That is, no doubt, the reasoning that prompted the gnu tar people to
> make it do what it does, but it has zero to do with reality for
> Postgres' usage in PITR base backups. What we care about is consistency
> on the page level: as long as each page of the backed-up file correctly
> represents *some* state of that page while the backup was in progress,
> everything is okay, because replay of the WAL log will correct any pages
> that are out-of-date, missing, or shouldn't be there at all. And
> Postgres always writes whole pages. So as long as write() and read()
> are atomic --- which is the case on all Unixen I know of --- everything
> works.
>
> (Thinks for a bit...) Actually I guess there's one extra assumption in
> there, which is that tar must issue its reads in multiples of our page
> size. But that doesn't seem like much of a stretch.
>
> regards, tom lane
That's OK for the WAL logs, but what about the initial archive - the recovery's got to start somewhere...
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: steve.holdoway@firetrust.com
Subject: Re: Backup of live database
In-Reply-To: <20080117075536.b03f6077.steve.holdoway@firetrust.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