Re: unable to repair table: missing chunk number

Поиск
Список
Период
Сортировка
От Alex Krohn
Тема Re: unable to repair table: missing chunk number
Дата
Msg-id 20020419125946.3BEF.ALEX@gossamer-threads.com
обсуждение исходный текст
Ответ на Re: unable to repair table: missing chunk number  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: unable to repair table: missing chunk number  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi Tom,

> > When I try to do any sort of SELECT, or COPY that accesses a part of the
> > table, I get:
> > ERROR:  missing chunk number 0 for toast value 12851102
>
> This is a long shot --- but does a VACUUM fix the problem?  There was
> a bug in TOAST up through 7.2 that could cause it to mess up after an
> aborted VACUUM FULL.  I think a fresh VACUUM would fix it though.

No good, I did a 'VACUUM mytable' and it ran ok, but a pg_dump still
reports:

pg_dump: ERROR:  missing chunk number 0 for toast value 12851102
pg_dump: lost synchronization with server, resetting connection

> If not, you'll have to identify exactly which tuple references the
> trashed toast value and get rid of it.

How do you correlate a tuple to a toast value? What is a toast value?
(Sorry new, to postgres). =)

When I dump the table to disk I get records in sequence by primary key
from 1 to 115847 before it crashes. So I then tried to SELECT * INTO
newtable WHERE primary_key > 115847. I tried increasing the value to see
where it broke, but even with primary_key > 130000 (out of 135,000),
it's always bad.

This may be totally broken logic, as it still may need to access the
data because of the > condition. =)

> BTW, how did you get into this state?

I'm not sure. I wasn't running VACUUM regularly which may have been the
cause. The program was running smoothly for about two weeks, and then
the application started failing for one or two users with that error in
the SQL log.

Thanks again for the help,

Alex


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: unable to repair table: missing chunk number
Следующее
От: Tom Lane
Дата:
Сообщение: Re: unable to repair table: missing chunk number