Alex Krohn <alex@gossamer-threads.com> writes:
> 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.
If not, you'll have to identify exactly which tuple references the
trashed toast value and get rid of it. If you're only seeing this
with one specific toast ID mentioned then there's no reason to think
you've lost more than one value, but table-wide SELECT or COPY won't
work unless you exclude the bad value.
BTW, how did you get into this state?
regards, tom lane