Re: VACUUM FULL missing chunk number 0 for toast value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yi Sun <yinan81(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: VACUUM FULL missing chunk number 0 for toast value
Date: 2022-01-03 16:18:09
Message-ID: 3561426.1641226689@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yi Sun <yinan81(at)gmail(dot)com> writes:
> Once we tried to vacuum full a table, got the error msg "ERROR: missing
> chunk number 0 for toast value", there is a doc as below for the select
> issue, but for our case select is no issue,

Hmm, "SELECT *" doesn't throw any error? That suggests that the
missing-toast-data problem is in a row that SELECT ignores because
it's dead, but VACUUM FULL is trying to copy it anyway, which would
imply that VACUUM thinks it's still visible to some old transaction.
Check to see if you've got old open transactions (particularly
prepared-and-never-committed transactions).

That's just a workaround of course. It's not very clear whether
there's any actual data corruption here, but if you're not having
SELECT problems, it seems like whatever it is isn't critical.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Avi Weinberg 2022-01-03 16:26:33 postgres_fdw FAST "where id in (140,144,148)" SLOW: "where id in (select 140 as id union select 144 union select 148)"
Previous Message Hasan Marzooq 2022-01-03 14:58:17 Re: pg_config header files are missing - Postgres 13 - Amazon Linux 2