Re: Corrupted Data?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Corrupted Data?
Дата
Msg-id 20040914135248.GA2785@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Corrupted Data?  ("Matthew T. O'Connor" <matthew@zeut.net>)
Ответы Re: Corrupted Data?  ("Matthew T. O'Connor" <matthew@zeut.net>)
Список pgsql-general
On Tue, Sep 14, 2004 at 08:13:24AM -0400, Matthew T. O'Connor wrote:
> On Tue, 2004-09-14 at 00:46, Chester Kustarz wrote:
> > On Mon, 13 Sep 2004, Matthew T. O'Connor wrote:
> > > I backed up the entire data directory, and did a pg_resetxlog, but that
> > > didn't help.  I found the specific row that seems to be the problem, but
> > > I can't delete it.
> >
> > I have used TRUNCATE on the table in this situation to recover. Another
> > option might be to DROP the table. Or perhaps restore from backups.
>
> I would really prefer not to do that as pg_dump has apparently been
> failing for a while so I would lose a fair amount of data.

You can create a pg_clog file (the one it's complaining about) filled
with zeros, using
dd if=/dev/zero bs=1k count=8 of=/path/to/data/pg_clog/0E3D

and then you should be able to pg_dump the table (or at least find out
if there is another corrupted tuple.)  Beware that the corrupted tuple
may be in there if it's supposed not to be, or it may not be if it's
supposed to be.

After you get your data back, I'd suggest running the usual hardware
checking tools, and restore from the backup.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Use it up, wear it out, make it do, or do without"


В списке pgsql-general по дате отправления:

Предыдущее
От: Harald Fuchs
Дата:
Сообщение: Re: PG case sensitivity
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: PG case sensitivity