Re: unable to dump database, toast errors - Mailing list pgsql-general

From Lonni Friedman
Subject Re: unable to dump database, toast errors
Date
Msg-id 3E9086F0.2050508@vasoftware.com
Whole thread Raw
In response to unable to dump database, toast errors  (Lonni Friedman <lfriedman@vasoftware.com>)
List pgsql-general
On 04/04/03 14:32, Tom Lane wrote:
>> i'm positive that there is a much more recent release.  this server is
>> sadly, very poorly maintained by the customer.  do you feel that the
>> segfaults generated in psql are blocking any possible solution to the
>> pg_dump failures, or can you/I work on a solution for that indpendently of
>> resolving the segfaults?
>
> Assuming that I've correctly diagnosed the segfault, it will only occur
> if you try to print an extremely wide value in psql.  It's pretty easy
> to avoid doing so, though.  For example, you could query for
> LENGTH(bin_data) or a SUBSTRING() of it, instead of printing the whole
> field value.  AFAIR, 7.2 does not have any optimizations that would
> skip fetching the whole toasted value when it is the argument of one of
> these functions, so "select length(bin_data) ..." should be just as
> useful for checking for brokenness as "select bin_data ...".

Hi Tom,
Following your suggestion, i pinned down the following:

sfee=# select LENGTH(bin_data) from artifact_file LIMIT 1 OFFSET 693;
ERROR:  missing chunk number 1 for toast value 7685119

However, what is very odd, is that I can view the entire contents of
that row's particular bin_data column if i do a normal select:
select bin_data from artifact_file LIMIT 1 OFFSET 693;

and it completes with no errors.  After more testing, it appears that
the 'select LENGTH(bin_data) ...' for any offset greater than or equal
to 693 dies with the same 'missing chunk...' error.

any suggestions on where to go from here?

thanks

-Lonni


pgsql-general by date:

Previous
From: Rod Kreisler
Date:
Subject: Re: PHP as PL
Next
From: "Raymond O'Donnell"
Date:
Subject: Consecutive queries