Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 60660B5DBF0 for ; Wed, 10 Aug 2011 03:06:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 02763-02 for ; Wed, 10 Aug 2011 06:06:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.216.181]) by mail.postgresql.org (Postfix) with ESMTP id 38039B5DBD6 for ; Wed, 10 Aug 2011 03:06:05 -0300 (ADT) Received: by qyk34 with SMTP id 34so431066qyk.19 for ; Tue, 09 Aug 2011 23:06:05 -0700 (PDT) Received: by 10.224.194.69 with SMTP id dx5mr2799605qab.355.1312956364882; Tue, 09 Aug 2011 23:06:04 -0700 (PDT) Received: from [10.1.1.8] (124-169-181-228.dyn.iinet.net.au [124.169.181.228]) by mx.google.com with ESMTPS id du3sm293944qab.9.2011.08.09.23.06.01 (version=SSLv3 cipher=OTHER); Tue, 09 Aug 2011 23:06:03 -0700 (PDT) Message-ID: <4E421FC4.8030403@ringerc.id.au> Date: Wed, 10 Aug 2011 14:05:56 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Sumeet Jauhar CC: pgsql-admin@postgresql.org Subject: Re: Fwd: Suspected Postgres Datacorruption References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/68 X-Sequence-Number: 38055 On 4/08/2011 1:14 AM, Sumeet Jauhar wrote: > 1 . There was a system crash due to a hardware failure . > A ) Isn’t Postgres database resilient enough to handle hardware system > failure ? or it sometime results in a corrupt index for its tables ? I You should *always* be able to pull the plug out of a box running Pg at any point and have it come up just fine. If you can't, it's a bug. They do turn up, but quite rarely and usually relating to odd corner cases in newly introduced features. If you've done something like turn off fsync, of course, you've just told PostgreSQL "I don't care about my data, don't bother keeping it crash safe" and you get garbage if there's a system crash. But that's your choice to enable if your use case doesn't require data durability. You haven't done that, so this isn't the cause of your issue. The only other known case (in a current version) where index corruption is expected after a crash is if you are using hash indexes. Hash indexes are NOT CRASH SAFE, as per the documentation, and WILL need to be reindexed after a crash. Don't use them unless you really know you need them (you don't). Of course, if you're using 7.4.2 or something ancient, you're missing a lot of bug fixes, and some of them DID relate to data durability issues. -- Craig Ringer