From: | Alex Krohn <alex(at)gossamer-threads(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: unable to repair table: missing chunk number |
Date: | 2002-04-19 20:08:42 |
Message-ID: | 20020419125946.3BEF.ALEX@gossamer-threads.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Tom,
> > When I try to do any sort of SELECT, or COPY that accesses a part of the
> > table, I get:
> > ERROR: missing chunk number 0 for toast value 12851102
>
> This is a long shot --- but does a VACUUM fix the problem? There was
> a bug in TOAST up through 7.2 that could cause it to mess up after an
> aborted VACUUM FULL. I think a fresh VACUUM would fix it though.
No good, I did a 'VACUUM mytable' and it ran ok, but a pg_dump still
reports:
pg_dump: ERROR: missing chunk number 0 for toast value 12851102
pg_dump: lost synchronization with server, resetting connection
> If not, you'll have to identify exactly which tuple references the
> trashed toast value and get rid of it.
How do you correlate a tuple to a toast value? What is a toast value?
(Sorry new, to postgres). =)
When I dump the table to disk I get records in sequence by primary key
from 1 to 115847 before it crashes. So I then tried to SELECT * INTO
newtable WHERE primary_key > 115847. I tried increasing the value to see
where it broke, but even with primary_key > 130000 (out of 135,000),
it's always bad.
This may be totally broken logic, as it still may need to access the
data because of the > condition. =)
> BTW, how did you get into this state?
I'm not sure. I wasn't running VACUUM regularly which may have been the
cause. The program was running smoothly for about two weeks, and then
the application started failing for one or two users with that error in
the SQL log.
Thanks again for the help,
Alex
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-04-19 20:32:22 | Re: unable to repair table: missing chunk number |
Previous Message | Tom Lane | 2002-04-19 19:43:59 | Re: unable to repair table: missing chunk number |