From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jesper Krogh <jesper@krogh.cc>
Cc: pgsql-admin@postgresql.org
Subject: Re: DB corruption.
Date: Sun, 09 Oct 2011 16:21:56 -0400
Message-ID: <15762.1318191716@sss.pgh.pa.us> (raw)
In-Reply-To: <4E91DE9C.60408@krogh.cc>
References: <4E9141C8.2020805@krogh.cc>
<3774.1318174917@sss.pgh.pa.us>
<4E91DE9C.60408@krogh.cc>
Jesper Krogh <jesper@krogh.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
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, jesper@krogh.cc
Subject: Re: DB corruption.
In-Reply-To: <15762.1318191716@sss.pgh.pa.us>
* 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