Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id DB4492E347F for ; Wed, 16 Jan 2008 14:55:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 05018-02 for ; Wed, 16 Jan 2008 14:55:46 -0400 (AST) Received: from server.firetrust.net (mailserver.firetrust.com [209.213.221.13]) by postgresql.org (Postfix) with ESMTP id E46BD2E3D6C for ; Wed, 16 Jan 2008 14:55:47 -0400 (AST) Received: from localhost.localdomain (root@[192.168.1.247]) (authenticated bits=0) by server.firetrust.net (8.14.2/8.14.2) with ESMTP id m0GItcja029702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 17 Jan 2008 07:55:44 +1300 Date: Thu, 17 Jan 2008 07:55:36 +1300 From: Steve Holdoway To: pgsql-admin@postgresql.org Subject: Re: Backup of live database Message-Id: <20080117075536.b03f6077.steve.holdoway@firetrust.com> 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> Organization: Firetrust Ltd X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.3; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Thu__17_Jan_2008_07_55_36_+1300_Diudat3n0PGnxK21" X-MailWasher-Server-Scanned: Checked by MailWasher server v2.2.3 (www.Firetrust.com) X-MailWasher-Server-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/188 X-Sequence-Number: 27962 --Signature=_Thu__17_Jan_2008_07_55_36_+1300_Diudat3n0PGnxK21 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, 16 Jan 2008 10:19:12 -0500 Tom Lane wrote: > Steve Holdoway writes: > > You can be absolutely certain that the tar backup of a file that's chan= ged is a complete waste of time. Because it changed while you were copying = it.=20 >=20 > 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. >=20 > (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. >=20 > regards, tom lane That's OK for the WAL logs, but what about the initial archive - the recove= ry's got to start somewhere...=20 --Signature=_Thu__17_Jan_2008_07_55_36_+1300_Diudat3n0PGnxK21 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHjlMoDN07rEXM5z0RAnvpAJ4oajsVFdBydteH66jlfqeSpdoL7wCePF1Q y3t3hqYv72odii5E3x1q8KQ= =JV0X -----END PGP SIGNATURE----- --Signature=_Thu__17_Jan_2008_07_55_36_+1300_Diudat3n0PGnxK21--