Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4Q2J-0003jt-8x for pgsql-general@arkaria.postgresql.org; Mon, 03 Jan 2022 16:18:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n4Q2H-000489-Gi for pgsql-general@arkaria.postgresql.org; Mon, 03 Jan 2022 16:18:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4Q2H-00047z-62 for pgsql-general@lists.postgresql.org; Mon, 03 Jan 2022 16:18:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n4Q2F-0004ru-5L for pgsql-general@postgresql.org; Mon, 03 Jan 2022 16:18:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 203GI9WX3561427; Mon, 3 Jan 2022 11:18:09 -0500 From: Tom Lane To: Yi Sun cc: pgsql-general@postgresql.org Subject: Re: VACUUM FULL missing chunk number 0 for toast value In-reply-to: References: Comments: In-reply-to Yi Sun message dated "Mon, 03 Jan 2022 17:28:49 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3561425.1641226689.1@sss.pgh.pa.us> Date: Mon, 03 Jan 2022 11:18:09 -0500 Message-ID: <3561426.1641226689@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Yi Sun 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