Re: Getting Error On pg_dump

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Getting Error On pg_dump
Дата
Msg-id 4EB9C5FA.101@ringerc.id.au
обсуждение исходный текст
Ответ на Getting Error On pg_dump  (Prashant Bharucha <prashantbharucha@yahoo.ca>)
Список pgsql-general
On 11/09/2011 05:49 AM, Prashant Bharucha wrote:
> Hello All
>
> Could you please help me ,Getting error when I try to get backup of
> database
>
> pg_dump: SQL command failed
> pg_dump: Error message from server: ERROR: missing chunk number 0 for
> toast value 87303 in pg_toast_27342

It looks like you have a damaged table.

Shut your database down and make a copy of the entire data directory
(including pg_xlog, pg_clog, and everything else in that folder) to a
different location. Make that copy read-only.

Most corruption issues are hardware related. Check your hard disks, RAID
controller, etc. Check your file systems. Check your system logs for
disk errors. Make sure you are NOT running with "fsync=off" in the
postgresql configuration, because if you are and you EVER had a crash
that's why you have the corruption. Check your CPU temperatures and if
you can run a memory test.

As for recovery: You can use the zero_damaged_pages option on a **COPY**
of your database to attempt a dump. This is likely to produce a dump
with some data missing or damaged, but the dump will finish.

Alternately, you can track down which table that toast table is
associated with using the pg_catalog tables and have a look at the main
table, see if you can identify and DELETE or UPDATE the damaged row(s).

--
Craig Ringer

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

Предыдущее
От: Prashant Bharucha
Дата:
Сообщение: Getting Error On pg_dump
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Postgres vs other Postgres based MPP implementations