Re: pg_dump: Error message from server: ERROR: missing chunk number - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: pg_dump: Error message from server: ERROR: missing chunk number
Date
Msg-id 4C17483A0200002500032367@gw.wicourts.gov
Whole thread Raw
In response to pg_dump: Error message from server: ERROR: missing chunk number  (Silvio Brandani <silvio.brandani@tech.sdb.it>)
List pgsql-admin
Silvio Brandani <silvio.brandani@tech.sdb.it> wrote:

> We have a standby database version postgres 8.3.1 on linux .

You should seriously consider upgrading to a more recent 8.3 bug fix
release.  The most current is now 8.3.11.  Please read this:

http://www.postgresql.org/support/versioning

There was a bug fix related to TOAST values in 8.3.6, although I'm
not sure whether that could be related to the corruption you
currently have in your database.

> During pg_dump we get the error:
>
> -- pg_dump: SQL command failed
> -- pg_dump: Error message from server: ERROR:  missing chunk
> number 0 for toast value 254723406
> -- pg_dump: The command was: COPY helpdesk.attachments_data (id,
> filedata, attachment_id) TO stdout;

> How can we fix this error and get a good dump??--

You need to read sets of rows to narrow down what row or rows are
damaged, capture any usable information from those rows, and then
delete them.

Do you have any idea how the damage occurred?  In particular, what
are your settings for fsync and full_page_writes?  Have you had any
power outages or OS freezes?  Any indication of hardware problems?
Any unusual issues like accidentally starting two PostgreSQL servers
against the same data directory?

-Kevin

pgsql-admin by date:

Previous
From: Silvio Brandani
Date:
Subject: pg_dump: Error message from server: ERROR: missing chunk number
Next
From: "Kevin Grittner"
Date:
Subject: Re: pg_dump: Error message from server: ERROR: missing chunk number