Re: pg_dump error - Mailing list pgsql-admin

From Tom Lane
Subject Re: pg_dump error
Date
Msg-id 27244.1126104864@sss.pgh.pa.us
Whole thread Raw
In response to pg_dump error  (Adam Witney <awitney@sgul.ac.uk>)
Responses Re: pg_dump error
List pgsql-admin
Adam Witney <awitney@sgul.ac.uk> writes:
> pg_dump: ERROR:  unexpected chunk number 3292 (expected 5) for toast value
> 144391872
> pg_dump: SQL command to dump the contents of table "measured_bioassay_base"
> failed: PQendcopy() failed.

> Any ideas whats happened here?

If you're lucky, it's just a corrupted index on the toast table for
"measured_bioassay_base", in which case a REINDEX will fix it.  You'll
need to look at the pg_class entry for "measured_bioassay_base" to find
out what the toast table's name is.  Something like

regression=# select relname from pg_class where oid =
regression-# (select reltoastrelid from pg_class where relname = 'measured_bioa
ssay_base');
     relname
-----------------
 pg_toast_597768
(1 row)

regression=# reindex table pg_toast.pg_toast_597768;
REINDEX

I would be interested to see "pg_filedump -i -f" output for the toast
table's index before you blow it away, if you have time for that.

            regards, tom lane

pgsql-admin by date:

Previous
From: Adam Witney
Date:
Subject: pg_dump error
Next
From: Michael Fuhr
Date:
Subject: Re: pg_dump error