Re: Very bizarre bug with corrupted index - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Very bizarre bug with corrupted index
Date
Msg-id 27309.1051903516@sss.pgh.pa.us
Whole thread Raw
In response to Very bizarre bug with corrupted index  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Very bizarre bug with corrupted index
List pgsql-bugs
Josh Berkus <josh@agliodbs.com> writes:
> The story:
> -- At 2am, the machine had an unexpected power-out and restarted apparently
> without problems (the logs show no significant errors at startup, anyway).
> -- At 8pm, a user makes 3 updates to the table launching the triggers.  They
> get an error message: "ERROR:  Index pk_table_aggs is not a btree"

> Copies of the actual corrupted index are available.   An examination of them
> shows something really bizarre; the entire index is zero-filled!

Did you shut down the postmaster (or at least force a checkpoint)
before examining the busted index?  It's barely possible that the zeroes
on disk didn't correspond to what was in buffer cache.  How big was this
index, anyway?

But I'm inclined to blame the filesystem --- I can't think of any
plausible mechanism in Postgres that would zero out all of a file.
What filesystem are you using?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Josh Berkus
Date:
Subject: Very bizarre bug with corrupted index
Next
From: Josh Berkus
Date:
Subject: Large object corruption