Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id C04661337B51 for ; Sun, 20 Feb 2011 12:53:08 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 48267-06 for ; Sun, 20 Feb 2011 16:53:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mail.postgresql.org (Postfix) with ESMTP id BB0441337B49 for ; Sun, 20 Feb 2011 12:53:00 -0400 (AST) Received: from [192.168.1.6] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MXkot-1PWYRR2Ujf-00WJct; Sun, 20 Feb 2011 17:52:59 +0100 Message-ID: <4D6146E9.2030302@2ndquadrant.com> Date: Sun, 20 Feb 2011 11:52:57 -0500 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Tony Nelson CC: pgsql-admin@postgresql.org Subject: Re: Corrupted disk References: <2B07A451-9F67-4438-8802-B10F46FDAF2E@starpoint.com> In-Reply-To: <2B07A451-9F67-4438-8802-B10F46FDAF2E@starpoint.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:vAhT0mYxlt14NLlnTmQtnBzsNoWd7IMDjUBIPLPOogm pyqvzt0KfwO9lpY5DUFlYcvwr3hWdGD7HueWxVZbKrsVmLahEW uNflK8njKRd0ynyrezdKdeJGITtmVx0pCRmoEM6xhG7m94Oqo9 g/WzInCSFQsdTrNTB2gjsr+q6lvQBw9CO0MOp9w0LHohvwyI6+ oO/atoBvBPH2/3NSPAGhqf3/UCpJuTe/Q7DY3EiB/8= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.6 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SARE_WEOFFER=0.3 X-Spam-Level: X-Archive-Number: 201102/178 X-Sequence-Number: 36817 Tony Nelson wrote: > I am ok, because I have a dump from last night, and wal since then. > Dumps made with pg_dump are easy to restore from. But they're fixed in time: there is no applying WALs to them in order to update them. Anything that's happened to the server since then you can't add. If you made a filesystem copy of the server using pg_start_backup/pg_stop_backup, and you save all of the WAL files after the backup began, that's also useful. You can store from that backup and apply all the WAL that's happened since then. > Can I drop/create/restore from this dump? Or should I restore from last nights full and apply the WAL? > If last night's backup with a filesystem one done with pg_start_backup/pg_stop_backup, and you have WAL since then, I would favor that set as likely to work fine. But it sounds like what you have might instead be a pg_dump backup and some WAL files; you can't apply the WAL to such a dump. Whatever you do, you want to make a full filesystem copy of the server's data directory--with the server shutdown--before you do anything else. It's possible to recover from page errors and extract the available data using the right data recovery techniques, especially if there's a pg_dump available too; we offer some services in this area. But if any serious changes are made to the database before we get to it, odds of successful recovery can drop fast. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books