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

From Lonni J Friedman
Subject Re: unable to dump database, toast errors
Date
Msg-id Pine.LNX.4.44.0304031020331.28169-100000@beefcake.hdqt.vasoftware.com
Whole thread Raw
In response to Re: unable to dump database, toast errors  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: unable to dump database, toast errors  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thu, 3 Apr 2003, Tom Lane wrote:
> Lonni J Friedman <lfriedman@vasoftware.com> writes:
> >> The real question is did pg_dump get any better after you did this?
>
> > unfortunately, no.

thanks for your reply.

> Oh well.  Have you checked that the reportedly-broken index is in fact
> the index for the TOAST table associated with the artifact_file table?
> (artifact_file's pg_class row will have the OID of its toast table in
> reltoastrelid, and then the reltoastidxid field of the toast table's
> row is the OID of its index.)  It could be that you've got more than
> one problem :-(

i'm not sure that i'm following you 100% here.  I'm able to dig this up:

# select * from pg_class where relname='artifact_file';
    relname    | reltype | relowner | relam | relfilenode | relpages |
reltuples | reltoastrelid | reltoastidxid | relhasindex | relisshared |
relkind | relnatts | relchecks | reltriggers | relukeys | relfkeys |
relrefs | relhasoids | relhaspkey | relhasrules | relhassubclass | relacl

---------------+---------+----------+-------+-------------+----------+-----------+---------------+---------------+-------------+-------------+---------+----------+-----------+-------------+----------+----------+---------+------------+------------+-------------+----------------+--------
 artifact_file |  302324 |      100 |     0 |      302323 |       20 |
786 |        302325 |             0 | t           | f           | r
|        9 |         0 |           0 |        0 |        0 |       0 | t
| t          | f           | f              |

so, am i off base?

> If you've actually lost a chunk from a toast value, as seems probable,
> I can't think of much to do except manually insert a substitute chunk.
> It would run something like
>
>     insert into pg_toast_302323 values (7685119, 0, '');

oddly on today's dump attempt, it fails with the following:
pg_dump: ERROR: missing chunk number 1 for toast value 7685119

so i tried:
    insert into pg_toast_302323 values (7685119, 1, '');

but that fails:
ERROR:  You can't change toast relation pg_toast_302323

> I am somewhat curious as to what happened to the missing chunk, but
> I dunno how much effort you want to spend on investigation.  A minimum
> bit of prudence would be to update this installation to 7.2.4; we don't
> make dot-releases just for amusement.

yea, i know.  unfortunately, this is a customer's server, and its been an
uphill battle to get them to do any sane maintanence.

thanks for your help,
Lonni


pgsql-general by date:

Previous
From: Darren Ferguson
Date:
Subject: Re: Suggestion
Next
From: Jason Hihn
Date:
Subject: Re: php - postgreSQL link module