Re: unable to repair table: missing chunk number - Mailing list pgsql-general

From William Meloney
Subject Re: unable to repair table: missing chunk number
Date
Msg-id 3CC08A83.6010506@mindspring.com
Whole thread Raw
In response to unable to repair table: missing chunk number  (Alex Krohn <alex@gossamer-threads.com>)
List pgsql-general
When faced with a similiar sounding problem I tried the following with
some success.  It is an extreme alternative and not suited to all
situations...that having been said, here goes.

pg_dump mytable >> mytable.txt

You said
 > When I dump the table to disk I get records in sequence by primary key
 > from 1 to 115847 before it crashes.

I looked at the mytable.txt file and found the last entry that pg_dump
was able to copy and noted the primary key number (115847).

I then executed a quiery that deleted the very next primary key number
(115848) record.  (*BAD!  Lost that data record.  BAD!*)

I was then able to do a pg_dump of the entire table followed by a
vacuum/analyze.  (*Good.  PG is running correctly. Good*)

In my singular case the loss of one data record is acceptable.  It may
not be for you.  Try this resolve only at your own risk and peril.

Peace

- Bill


pgsql-general by date:

Previous
From: Jeff Post
Date:
Subject: Building perl mods pg:PG or DBD:PG on non-PostgreSQLable machines
Next
From: Tom Lane
Date:
Subject: Re: ROWTYPE as parameter to function