| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Jesper Krogh <jesper(at)krogh(dot)cc> |
| Cc: | pgsql-admin(at)postgresql(dot)org |
| Subject: | Re: DB corruption. |
| Date: | 2011-10-09 20:21:56 |
| Message-ID: | 15762.1318191716@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
Jesper Krogh <jesper(at)krogh(dot)cc> writes:
> On 2011-10-09 17:41, Tom Lane wrote:
>> The traditional solution is to zero out the bad block, eg using dd from
>> /dev/zero. It's easy to zero more than you intended, so practicing on a
>> scratch copy of the table is recommended.
> So it is "just" blocknumber * blocksize .. offset, blocksize of zeroes.. ?
> Or is the math harder?
You have to account for the division of the table into segment files;
if blocknumber * blocksize is greater than 1GB, reduce modulo 1GB and
look to the appropriate "xxx.n" segment file. Otherwise it's what
you'd expect.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Lukasz Brodziak | 2011-10-09 20:33:04 | Re: DB corruption. |
| Previous Message | Jesper Krogh | 2011-10-09 17:49:16 | Re: DB corruption. |