Re: pg_dump error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adam Witney <awitney(at)sgul(dot)ac(dot)uk>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_dump error
Date: 2005-09-07 14:54:24
Message-ID: 27244.1126104864@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Adam Witney <awitney(at)sgul(dot)ac(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Fuhr 2005-09-07 14:55:19 Re: pg_dump error
Previous Message Adam Witney 2005-09-07 14:49:45 Re: pg_dump error... Follow up