Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B5D491337BC4 for ; Tue, 12 Apr 2011 21:40:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 78258-04 for ; Wed, 13 Apr 2011 00:40:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id CCA2813364DE for ; Tue, 12 Apr 2011 21:40:40 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p3D0ec6Y020371; Tue, 12 Apr 2011 20:40:38 -0400 (EDT) To: Mike Atkin cc: pgsql-admin@postgresql.org Subject: Re: WAL archiving disaster In-reply-to: References: Comments: In-reply-to Mike Atkin message dated "Tue, 12 Apr 2011 17:33:37 +0100" Date: Tue, 12 Apr 2011 20:40:38 -0400 Message-ID: <20370.1302655238@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/119 X-Sequence-Number: 37300 Mike Atkin writes: > So... normally this would be curtains for the database but the missing > segment is from a 4 hour period of practically zero activity. It was > only archived because it hit the archive_timeout. Is there any way I > can force postgres to ignore this segment and attempt to redo the rest > of the logs. I realise this may leave the database terminally > inconsistent but my focus is on retrieving as much of the data as > possible for re-entry rather than getting a functional system out the > other end. If you're willing to assume there were no updates in that interval, you could try generating a dummy WAL segment having the correct page headers and no contents except an XLOG_SWITCH record. I don't know of any handy tools for that unfortunately. regards, tom lane