Re: missing chunk number 0 for toast value 25693266 in pg_toast_25497233 - Mailing list pgsql-general

From Bryan Murphy
Subject Re: missing chunk number 0 for toast value 25693266 in pg_toast_25497233
Date
Msg-id k2n7fd310d11005070753w1348c45ds9d24dafd1a351f42@mail.gmail.com
Whole thread Raw
In response to Re: missing chunk number 0 for toast value 25693266 in pg_toast_25497233  (Magnus Hagander <magnus@hagander.net>)
List pgsql-general
On Fri, May 7, 2010 at 9:02 AM, Magnus Hagander <magnus@hagander.net> wrote:
> Try doing a binary search with LIMIT. E.g., if you have 20M reecords,
> do a SELECT * FROM ... LIMIT 10M. (throw away the results) If that
> broke, check the upper half, if not, check the lower one (with
> OFFSET).
>
> If you have a serial primary key or something, you can use WHERE on it
> which will likely be a lot faster than using LIMIT, but the same idea
> applies - do a binary search. Should take a lot less than days, and is
> reasonably easy to script.

That's my next step if I can't find a quicker/simpler method.  My math
tells me that my current script is going to take 24 days to test every
record.  Obviously, there are ways I can speed that up if I have no
choice but I'm hoping for a simpler solution.

I'd prefer to run a COPY TABLE like command and have it skip the bad records.

Thanks,
Bryan

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: unable to avoid a deadlock at the end of a long transaction
Next
From: Sorin Schwimmer
Date:
Subject: Formatted reports