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 5318B5280D for ; Thu, 23 Jun 2005 18:41:42 -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 52070-08 for ; Thu, 23 Jun 2005 21:41:33 +0000 (GMT) Received: from cmailm4.svr.pol.co.uk (cmailm4.svr.pol.co.uk [195.92.193.211]) by svr1.postgresql.org (Postfix) with ESMTP id 44EA952881 for ; Thu, 23 Jun 2005 18:41:32 -0300 (ADT) Received: from modem-2482.leopard.dialup.pol.co.uk ([217.135.153.178] helo=192.168.0.102) by cmailm4.svr.pol.co.uk with esmtp (Exim 4.41) id 1DlZS1-0001HD-Jy; Thu, 23 Jun 2005 22:41:33 +0100 Subject: Re: restoring wal archive and pg_xlog dir From: Simon Riggs To: Jeff Frost Cc: pgsql-admin@postgresql.org In-Reply-To: References: Content-Type: text/plain Organization: 2nd Quadrant Date: Thu, 23 Jun 2005 22:40:44 +0100 Message-Id: <1119562844.3645.549.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.053 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/179 X-Sequence-Number: 17934 On Thu, 2005-06-23 at 10:55 -0700, Jeff Frost wrote: > When reading the docs on recovery.conf, I noticed this: > > WAL segments that cannot be found in the archive will be sought in pg_xlog/; > this allows use of recent un-archived segments. However segments that are > available from the archive will be used in preference to files in pg_xlog/. The > system will not overwrite the existing contents of pg_xlog/ when retrieving > archived files. > > If the system will use the files in the archive in preference to the ones in > pg_xlog, how can this actually happen if it will not overwrite the contents of > pg_xlog? That was the bit I thought of. The files are streamed in one by one using a temp filename, so you never run out of space no matter how big the archive of transaction logs. Thats an important feature if a base backup goes bad and you have to go back to n-1 base backup. > I also noticed that if there is not at least one wal archive available in > the archive or the pg_xlog dir, the restore errors out and exits. So the > base backup is really not complete without at least one wal archive > following it. Is this by design? That was the bit I didn't. Fix partially implemented and I am to submit for 8.1, godspeed my typing fingers. There's a simple workaround if you have a low transaction rate system: load up enough data to trip into the next xlog. Best Regards, Simon Riggs