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 ABF108B9E94 for ; Tue, 22 Feb 2005 14:18:25 +0000 (GMT) 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 74124-10 for ; Tue, 22 Feb 2005 14:18:19 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 4CCEA8B9E7A for ; Tue, 22 Feb 2005 14:18:20 +0000 (GMT) Received: (qmail 24378 invoked by uid 500); 22 Feb 2005 14:33:37 -0000 Date: Tue, 22 Feb 2005 08:33:37 -0600 From: Bruno Wolff III To: =?iso-8859-1?Q?K=D6PFERL?= Robert Cc: pgsql-admin@postgresql.org Subject: Re: Corrupt data directory Message-ID: <20050222143337.GA22550@wolff.to> Mail-Followup-To: =?iso-8859-1?Q?K=D6PFERL?= Robert , pgsql-admin@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/216 X-Sequence-Number: 16384 On Tue, Feb 22, 2005 at 12:09:28 +0100, KÖPFERL Robert wrote: > Hi, > what is to do if somehow, someif the data directory went corrupt? > (kill -9, Plug out) > Are there any tools or other ways to rescue that or is the only way > rm *; initdb > and restore a backup? You just restart postgres. It will clean up properly. Note this assumes that you haven't disabled fsync or left write caching on for your disk drives. If a disk drive actually goes bad (or enough drives to lose a raid array), then you need to go to backups.