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 1nFU52-0000Sh-GN for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Feb 2022 04:50:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nFU51-0008EE-DG for pgsql-bugs@arkaria.postgresql.org; Thu, 03 Feb 2022 04:50:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFU51-0008E4-57 for pgsql-bugs@lists.postgresql.org; Thu, 03 Feb 2022 04:50:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFU4y-00067w-SV for pgsql-bugs@lists.postgresql.org; Thu, 03 Feb 2022 04:50:46 +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 2134ofce198234; Wed, 2 Feb 2022 23:50:41 -0500 From: Tom Lane To: Justin Pryzby cc: padam.tehlan@leptonsoftware.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17384: ERROR: missing chunk number 0 for toast value 152073604 in pg_toast_2619 In-reply-to: <20220203044257.GH23027@telsasoft.com> References: <17384-f50f2eedf541e512@postgresql.org> <20220203044257.GH23027@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Wed, 02 Feb 2022 22:42:57 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <198232.1643863841.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Feb 2022 23:50:41 -0500 Message-ID: <198233.1643863841@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby writes: > On Thu, Jan 27, 2022 at 08:57:28PM +0000, PG Bug reporting form wrote: >> Issue: ERROR: missing chunk number 0 for toast value 152073604 in >> pg_toast_2619 >> we are facing issue with mentioned short description error while trying= any >> operation on database. = > From my notes from a handful of years ago, I think you'll have luck doin= g some > things like this: The good news is that that's the toast table for pg_statistic, which means that there is exactly no irreplaceable data in it. If all else fails, you can just truncate pg_statistic and then re-ANALYZE the whole database to rebuild it. (I say "just" truncate pg_statistic, but you'll have to do that in a standalone backend started with the -O option, else there are permissions checks that will prevent it.) The bad news is that there might be more corruption lurking elsewhere. What event precipitated this? I think we have seen some bugs that would preferentially affect pg_statistic, but not recently. If you're not running a current minor release, an update is advisable. regards, tom lane