Search Postgresql Archives

Re: Getting Error On pg_dump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux