Re: Fwd: index corruption in PG 8.3.13 - Mailing list pgsql-hackers

From Nikhil Sontakke
Subject Re: Fwd: index corruption in PG 8.3.13
Date
Msg-id AANLkTincXZsrWOcghjcqba7xcwCfM7kYck-v-zdgN7od@mail.gmail.com
Whole thread Raw
In response to Re: Fwd: index corruption in PG 8.3.13  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
>
> What does stat say for the index data file? Are the Size and Blocks
> values the same (modulo block size)? Or are these blocks actually not
> allocated?
>
stat 58401 File: `58401' Size: 4300800       Blocks: 8400       IO Block: 4096   regular file
Device: 801h/2049d    Inode: 13901264    Links: 1

modulo 8192 it gives 525 which is the number of blocks that we see.

> Postgres always forces blocks to be allocated but if they were lost
> due to filesystem corruption maybe they're not allocated any more.
>

Actually these blocks are like a big hole in between. Blocks 279 to
518 are zeroed out and then 519 to 524 is index data. Number 523 is
the one which has been zeroed out too causing all the mayhem.

Regards,
Nikhils


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Fwd: index corruption in PG 8.3.13
Next
From: David Fetter
Date:
Subject: Re: Fwd: psql include file using relative path