Re: Very bizarre bug with corrupted index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, mail(at)joeconway(dot)com
Subject: Re: Very bizarre bug with corrupted index
Date: 2003-05-02 19:25:16
Message-ID: 27309.1051903516@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Josh Berkus 2003-05-02 20:02:03 Large object corruption
Previous Message Josh Berkus 2003-05-02 18:08:22 Very bizarre bug with corrupted index