Getting Error On pg_dump

Поиск
Список
Период
Сортировка
Искать

Getting Error On pg_dump

От:
Prashant Bharucha <prashantbharucha@yahoo.ca>
Дата:
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

Thx
Prashant

Re: Getting Error On pg_dump

От:
Craig Ringer <ringerc@ringerc.id.au>
Дата:
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
FAQ