From: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> |
---|---|
To: | Prashant Bharucha <prashantbharucha(at)yahoo(dot)ca> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Getting Error On pg_dump |
Date: | 2011-11-09 00:14:50 |
Message-ID: | 4EB9C5FA.101@ringerc.id.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Ondrej Ivanič | 2011-11-09 00:43:53 | Re: Postgres vs other Postgres based MPP implementations |
Previous Message | Craig Ringer | 2011-11-09 00:10:38 | Re: Postgres vs other Postgres based MPP implementations |