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 1qHvgH-0007mt-6O for pgsql-bugs@arkaria.postgresql.org; Sat, 08 Jul 2023 00:20:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qHvgF-0006Q3-Kb for pgsql-bugs@arkaria.postgresql.org; Sat, 08 Jul 2023 00:20:07 +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 1qHvgF-0006Pt-Cd for pgsql-bugs@lists.postgresql.org; Sat, 08 Jul 2023 00:20:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qHvgB-002orV-BC for pgsql-bugs@lists.postgresql.org; Sat, 08 Jul 2023 00:20:05 +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 3680K1mC1457242; Fri, 7 Jul 2023 20:20:01 -0400 From: Tom Lane To: Michael Paquier cc: richard.vesely@softea.sk, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18016: REINDEX TABLE failure In-reply-to: References: <18016-2bd9b549b1fe49b3@postgresql.org> Comments: In-reply-to Michael Paquier message dated "Sat, 08 Jul 2023 09:17:21 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1457240.1688775601.1@sss.pgh.pa.us> Date: Fri, 07 Jul 2023 20:20:01 -0400 Message-ID: <1457241.1688775601@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Thu, Jul 06, 2023 at 08:29:19PM +0000, PG Bug reporting form wrote: >> Given a table with a TOASTed variable length attribute, REINDEX TABLE fails >> to rebuild indexes when you truncate (or otherwise corrupt) relation files >> for both TOAST table index and a custom index on the varlena. > Could you clarify what you have done here? Did you manipulate the > physical files in the data folder before running the REINDEX commands > you expected should work? There are many things that can go wrong if > you do anything like that. I think the point of that was just to have a way to reproduce the problem on-demand. I follow the argument, which is that if there's actual corruption in the TOAST index (for whatever reason) that might interfere with rebuilding the table's other indexes. regards, tom lane