Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x5jig-000FAj-0p for pgsql-hackers@arkaria.postgresql.org; Sun, 13 Sep 2026 12:54:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x5jhe-008hZ7-2l for pgsql-hackers@arkaria.postgresql.org; Sun, 13 Sep 2026 12:53:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x5jhe-008hYj-1c for pgsql-hackers@lists.postgresql.org; Sun, 13 Sep 2026 12:53:02 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x5jha-00000000Byf-0LGI for pgsql-hackers@lists.postgresql.org; Sun, 13 Sep 2026 12:53:01 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id E6FD11D000CC; Sun, 13 Sep 2026 08:52:56 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Sun, 13 Sep 2026 08:52:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1789303976; x= 1789390376; bh=470ZqUh2ZfDN4DGCnFoVcmr5yUuUElfU4BDN9DnuPlc=; b=N NmsHGACtZzSFGq8tv2JqUyAk23LfORiUviwgpLP2rct7vXXXixSP9bt2ZZnfD3BK /1Y2Dbyhz432dJ01LilkUbGw3TqMS0gAK+vujFggfdgjA41gE5s1giP0Ewbhx/cP 4KwIQdDISrb6bgrBTNrN4I/PV439bFSEYXflexqniMOskQbjV8HsIEfBEOYLRHKR ljX9eFhaqAKKt+hTyKJYuyyeIePgOOi9LRWj/i92zos+GR91zeGGeDJprHlvZv5a zHuRbXMwCbZeqzdQNCFqvh3VOsrwcBX/kqnn440B5+xC4pfPKtlPr/v9SAWCuGvZ lr8kyD1afvHasD0S5T5+A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1789303976; x=1789390376; bh=4 70ZqUh2ZfDN4DGCnFoVcmr5yUuUElfU4BDN9DnuPlc=; b=K6+SARiPLXKBhj4j3 EKfk+Byfh70mbFYxT00RsExx6Sr90XoYLSW/SDUCldpv1RnXccmQyaikqt2tjUhH 714FCXfDilrpjVbwImmQK1FDAJG6qN27MibglcsmG+bi/5lPg8iP94Ocret73Kh3 SGgHKWWAyzVhB9HMCB+sFWCQJbmGL/COtiHVAwMH0RVaebCu5R2kSgDu3EBWeRuB ALw+/RTkwAhXG45Hkt6XwDIiMyGTxwhzeKKRceau3dCigpm5Zd52Z7n0tJLCiMvp Bczu8dPQYYAyoKyh1/KbwQ1KJE/qTMlCUuaNxJADF1UAQdDmEpv9wdEoBSuv4eKv dd0Aw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTECakcHGZ7MlfCIuG3v/gAONzAXCh9gjvRhJNrr43eL9r+JCtISu/b5IKv8OjfdLM 6BdesgQkUfhvD/y+yXzjQn4ykWpfc+Ae5Btv+YjNUPpE94O85KCJKxxXzo8EamWCBTfby2 0ZtuTtY2hlCAC6QEUAoapph4N2xqsQYMHY9xu10wd3if6tqqkfDx1cu5vPOPwYNbCNKR/q Q4N5XtPewcq21sVr+2dv+31MF60GzkeHouF2t7wVUm/v7S+n2Y17EyYVrgeLd2XbEvqHwL su+H/sgc6IRLa0u9NhCTM1XfnwDEFl/3HnNiz+lwEgJU75NEmBzV0torMyRd6i3b1aXkGZ d4Qo/Jfed3+8wMta5NznXB771LTcdo6OoFvvAF2xSy5prP+YPDxjLfLJHO53W1WSD5iFlZ 5pVoE+lKK9GHNZ6cUvi3Vq2KRgpAlmNXO0ItyhfM7MdVw8+Z9ye5dgYeIse/j0lYMjKHP8 sTH4T0b+wG8mGdojDG5DWZ5wbn56N+wtPXQ2MghwIXKOyCptz+E4tP5I0a8JRLU1JcJNPI S6fggTYgO6cQGxEajFLYWEdgaGzatIETLiJxAhsF21InFj5pJAgNBdAbVj/kL7LT31iwgT +LE2St5LDKIjrmzq0RfpE0Ie8qa35uJg9i24m+BlLJ+a4ryMEWvz1+7Ax6pQ X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 13 Sep 2026 08:52:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1789303974; bh=sAFqQKlFaQxZJ5iHge8LS3vFl1/VXOA96SMJ73nrS50=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=qIuZFPL1TS9xpo6VEveY1gNw0VUyPMxQo0QHIyaIFYxRz0dhLqN9OwAYuhrYQQHxj ZMwQb6MUTIG2gLq4CngSq+Zq9m2SDeAXuvsD1NZxgIkgdb5Irjydi1mCHTohRd1Aum MSX9+qfz4Qh37IHbNb6hUHHKsplNYfRX9bM+tzR+mu/UqL3OpQX72oe69fKKMC5E5W y1qyxKdPtY4UxVX1XvGeSh6eh/WlTZdMtZ8pNZx6jvJ1cyS0oQkEsSmScxSfBrnim8 gfK49fp/Vmv0w5HaTPGOgiVxRo8EqbMUo0JsyXuEwrYFztTVB5C5d7Dm2NKP4U1TmP ijGHa3yshlGtw== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id CE4E0B002D6; Sun, 13 Sep 2026 14:52:54 +0200 (CEST) Date: Sun, 13 Sep 2026 14:52:54 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Fujii Masao Cc: Adam Lee , pgsql-hackers@lists.postgresql.org, Antonin Houska Subject: Re: CLUSTER progress: wrong index_rebuild_count for tables with TOAST Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Sep-09, Fujii Masao wrote: > I think the approach in the patch, i.e., passing INDEX_CREATE_SUPPRESS_PROGRESS > to suppress progress reporting when creating TOAST indexes, looks good. > But, adding that test seems overkill to me. I'd prefer to simplify the patch > as in the attached 0001 patch. Thoughts? I agree that the test is overkill -- after all, we don't test any of progress reporting, and I'm not sure it's really a great approach to do that by adding bespoke injection points. Your 0001 looks good to me. Maybe in a future release we can discuss a framework for making progress updates visible in debug builds, so that they can be observed from a new test framework. > While working on this patch, I also found a related but separate issue: > during REPACK (CONCURRENTLY), index_rebuild_count in > pg_stat_progress_repack and pg_stat_progress_cluster did not advance > as indexes were rebuilt. The attached 0002 patch fixes this issue. Hmm, yeah, this patch looks good also. I admit that the flow is a bit confusingly different in the concurrent vs. non-concurrent cases: in the former, finish_heap_swap() is called with reindex=false, so reindex_relation() is not called from there, and instead we get these counter updates (with your patch) from build_new_indexes(); in the concurrent patch, the counter updates come from inside finish_heap_swap() instead. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "There's no problem so awful that you can't add some guilt to it and make it even worse" (Calvin [& Hobbes])