From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yi Sun <yinan81@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: VACUUM FULL missing chunk number 0 for toast value
Date: Mon, 03 Jan 2022 11:18:09 -0500
Message-ID: <3561426.1641226689@sss.pgh.pa.us> (raw)
In-Reply-To: <CABWY_HCozA7UfD-TDS4tA5y50rpiUR+jR4iVS_qyq6X2LVya0w@mail.gmail.com>
References: <CABWY_HCozA7UfD-TDS4tA5y50rpiUR+jR4iVS_qyq6X2LVya0w@mail.gmail.com>
Yi Sun <yinan81@gmail.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, yinan81@gmail.com
Subject: Re: VACUUM FULL missing chunk number 0 for toast value
In-Reply-To: <3561426.1641226689@sss.pgh.pa.us>
References: <CABWY_HCozA7UfD-TDS4tA5y50rpiUR+jR4iVS_qyq6X2LVya0w@mail.gmail.com> <3561426.1641226689@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox