X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8C870D1B899 for ; Fri, 5 Sep 2003 00:33:00 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 64395-09 for ; Thu, 4 Sep 2003 21:32:53 -0300 (ADT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id D94ADD1BA9C for ; Thu, 4 Sep 2003 21:32:48 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h850WcB18836; Thu, 4 Sep 2003 20:32:38 -0400 (EDT) From: Bruce Momjian Message-Id: <200309050032.h850WcB18836@candle.pha.pa.us> Subject: Re: Seeking information about backup/recovery In-Reply-To: <2D92FEBFD3BE1346A6C397223A8DD3FC0923CD@THOR.goeci.com> To: Murthy Kambhampaty Date: Thu, 4 Sep 2003 20:32:38 -0400 (EDT) Cc: Mary Edie Meredith , pgsql-admin@postgresql.org, osdldbt-general X-Mailer: ELM [version 2.4ME+ PL106 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/86 X-Sequence-Number: 10174 Murthy Kambhampaty wrote: > >Anyway, unfortunately, WAL doesn't contain enough information > >to recover > >without having the file system files in some consistent state, even if > >that state is old. In fact, the files have to be consistent as of the > >last checkpoint. > This, I'm not so sure of. On Linux, an xfs_freeze -f pauses > the filesystem and flushes all writes to disk; a snapshot of $PGDATA's > filesystem taken while it is frozen gives a consistent copy of $PGDATA as of > that instant (similar functionality is obtained by compiling the VFS locking > patch into the kernel). > > The discussion at > http://marc.theaimsgroup.com/?l=postgresql-admin&w=2&r=1&s=LVM+snapshots&q=b > , includes log files from postmaster startup and shutdown on the backup > $PGDATA, and AFAICT, WAL recovery does not roll back to the last checkpoint. > If there is a better way to test this, let me know, and I'm happy to do it. Yes, this has been discussed before. If you snapshot xfs, you can then restore using that snapshot. Of course, you will be recovering from WAL as though there was a crash, but that works fine. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073