X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D1D32D1B1C8 for ; Thu, 22 Jul 2004 00:54:59 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 99271-01 for ; Thu, 22 Jul 2004 03:55:03 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 142F7D1B195 for ; Thu, 22 Jul 2004 00:54:54 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id i6M3smv21365; Wed, 21 Jul 2004 23:54:48 -0400 (EDT) From: Bruce Momjian Message-Id: <200407220354.i6M3smv21365@candle.pha.pa.us> Subject: Re: [HACKERS] Point in Time Recovery In-Reply-To: <2654.1090467742@sss.pgh.pa.us> To: Tom Lane Date: Wed, 21 Jul 2004 23:54:48 -0400 (EDT) Cc: Mark Kirkwood , Simon Riggs , pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/246 X-Sequence-Number: 14314 Tom Lane wrote: > Bruce Momjian writes: > > Agreed, it might not be possible, but your report does point out a > > limitation in our implementation --- that a shutdown database contains > > more information than a backup and the archive logs. That is not > > intuitive. > > That's only because you are clinging to the broken assumption that > pg_xlog/ is part of the database, rather than part of the logs. > Separate that out as a distinct entity, and all gets better. Imagine this. I stop the server. I have a tar backup and a copy of the archive. I should be able to take them to another machine and recover the system to the point I stopped. You are saying I need a copy of pg_xlog directory too, and I need to remove pg_xlog after I untar the data directory and put the saved pg_xlog into there before I recover. Should we create a server-side function that forces all WAL files to the archive, including partially written ones. Maybe that fixes the problem with people deleting pg_xlog before they untar. You tell them to run the function before recovery. If the system can't be started, the it is possible the WAL files are no good too, not sure. -- 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