Re: pg_dump: Error message from server: ERROR: missing chunk number

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-admin(at)postgresql(dot)org>, "Silvio Brandani" <silvio(dot)brandani(at)tech(dot)sdb(dot)it>
Subject: Re: pg_dump: Error message from server: ERROR: missing chunk number
Date: 2010-06-15 14:30:34
Message-ID: 4C17483A0200002500032367@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Silvio Brandani <silvio(dot)brandani(at)tech(dot)sdb(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2010-06-15 14:34:41 Re: pg_dump: Error message from server: ERROR: missing chunk number
Previous Message Silvio Brandani 2010-06-15 13:38:42 pg_dump: Error message from server: ERROR: missing chunk number