From: Craig Ringer <ringerc@ringerc.id.au>
To: Sumeet Jauhar <sumeet.jauhar@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Fwd: Suspected Postgres Datacorruption
Date: Wed, 10 Aug 2011 14:05:56 +0800
Message-ID: <4E421FC4.8030403@ringerc.id.au> (raw)
In-Reply-To: <CAKN1XtqtW7iWevGXJ0TBuix8Nm3r52fpbsy4bvV3zY69NjFpLQ@mail.gmail.com>
References: <CAKN1XtpsdHSJskgqFcNQGSFSLznKmE8D=SvM8wMr82GHmk6s0Q@mail.gmail.com>
<CAKN1XtqtW7iWevGXJ0TBuix8Nm3r52fpbsy4bvV3zY69NjFpLQ@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: ringerc@ringerc.id.au, sumeet.jauhar@gmail.com, pgsql-admin@postgresql.org
Subject: Re: Fwd: Suspected Postgres Datacorruption
In-Reply-To: <4E421FC4.8030403@ringerc.id.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox