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.98.2) (envelope-from ) id 1x7DWi-00000000C7J-2tZJ for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Sep 2026 14:55:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x7DWh-00000004sSf-3q1P for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Sep 2026 14:55:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7DWh-00000004sSW-0Utt for pgsql-hackers@lists.postgresql.org; Thu, 17 Sep 2026 14:55:51 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7DWf-000000009mC-0k2I for pgsql-hackers@lists.postgresql.org; Thu, 17 Sep 2026 14:55:50 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id A3AC6EC003D; Thu, 17 Sep 2026 10:55:47 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Thu, 17 Sep 2026 10:55:47 -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=fm3; t=1789656947; x= 1789743347; bh=ZeIkpGY64IwiTQEK9wjaGJt3J1IE4Bur98FKyxJFWwk=; b=t JwLmw6uLCisiu16WA3oFc/dl5GJiw2eD3dJIdBuQiRpUrNJH1XZuvRJXKNrmqOO2 0fTYFsHTDr9Bs7dS1dLPzV0WPXASTz2oiinHdqjfuK0ZvXq6WbF/X3fHHPit5dtk BV0/0QLeUDK91ctADNsadI2o2mRD12431EUbrGYet0lNBJ4cLYJMv6x2cb6g9sck VWhPLgLvHDdxIllK47RgQnqX+W23X+gvh5p8nhr+D84L1mEvvpwhfJ8Mm2pCAIAH k2U0LdgM0ERpPCtmscPh2dF5TgX3jDkGGD7RS6Yo6XKilHwlhTbHTTbeKl8mDbBI xfcRzJK1QkkjzQsfudiTw== 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=1789656947; x=1789743347; bh=Z eIkpGY64IwiTQEK9wjaGJt3J1IE4Bur98FKyxJFWwk=; b=QJliSBDDwGZCLxmzC So5IyCGn4kbCS4K3NAoOqCZgqIIwvh6oLAYhYG8RavevWH520wa1ZaRf5/5v02NW RyqX3Fj2xkez8TNq/dP20LAHg5S/VOebUQS92cc4JHcojg5We7oKTIaATp/4faf4 BoRPhBe587gehb7dgPuXQkeR3qgunQnJeS/FXvxkSyjKywrOxhKVE5Sfpv0wmKy0 l7L9Ab5ClLxI9BB3fI1swgt8R80Mnz5pB+0fFQ2ksNJT6fhMvi82gj6PdzHltIFA RbKoQ06ESeoB980RBZt6skUI2Ng2bw6gFyr1edkhIqZ6qt34T8hgE7ZjxRRUlL2r hQd4Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGwRBUxdQKyzt1TslgZhWkUqwECMMPV+a/0XELIuVkac+ebu777hCTxiB493/MG7G ZWw2y+IVkcqsT3rCX1gY3sDOzCKA7sdiCokta5hrzMXWHIIniXQX9jtuSCj3NXTqrAmfYZ YaqsCB95SEpKeGNE9ysOhDp2VXNgwJgHfms7GDFUk++XppKFGLGfCiRXXRj1umipjNE1Ip RtOfTz9pbf+m9XEQAU4a/+GCFm0epz5gfjXDmWqUyvP8ZkPhgQ2s1cY2RWsButFrVV7wAW Oe2xqurh+pkzU1NefD31fMkkEGGTy3UXR0y7dgh8sf3pCxKTUW41gpHDw3YiJWUIr1aMrk MOPFK2pvB/EuJvCxB+M3unG7wBfS+vbZJAm6FcVeXjG/pMOWW/cVi7WW6mzYI7M8crBWpR t9DbNGt4yqEtRFQFNaHUBgqxkUDmAmNEYzL+K8zEnXgtSL+345jPOpkP1bQ9UTKXaZfdYJ aU1149y9nMr802XDSCMYeuj8JK6R4yzvPNQKZkm3ZlAM6BgbBVYT84zH/QMmPWGhgsE8bc mQYCACZw/f4weTFlf3LBLjnwXsgQIvimEh8n4JGRofa2oHcVvzDvWhYvHaPK7TF3faEuwO jiOqXsn6PMyH2e3i4aTaf4Uq74KF1ui4vdZKMtGLpTlssI0CH7PCLeGsaE+A X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 17 Sep 2026 10:55:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1789656944; bh=NVP4I0O8k/NMMHHJHriCtFn+Jb6dHZ+uBJ20314qj2Y=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=1SyPteyWLXuGOfd+hzMilpeaRIaQ4iyG4V+4YSI9ehtp3F4EPmAhMRlAv46A1+cIT mELUrP3N0sEtz0TmSwNRVbY4SroUrKZgwCkPfCR3dUdaybGGaTxuUo73luuc91RfDy kH9i5EsR/CqWNjp2xdFa4U1WoKpKPwAewAUuDfJCNJcF2ldXg9QS5aY3FJi0CpulVU oYe4siUI3BY6OYR5g37L6NnxdYdL/PBD7wWyWEQtasEloFt9mmOeZwP285kS5hk36z 6niMq7qluer5TyCn4lCQVxH1rbyZSyGb90WWEtcYR0VGTu76Zltsfkjb0bl49+Zo8/ PyQFIJnFY9T5w== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 4DFAFB0008E; Thu, 17 Sep 2026 16:55:44 +0200 (CEST) Date: Thu, 17 Sep 2026 16:55:44 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Manuel Reyes Bravo Cc: PostgreSQL Hackers , Fujii Masao , Adam Lee Subject: Re: Add a test for index_rebuild_count of REPACK (CONCURRENTLY) 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 Hello, On 2026-Sep-16, Manuel Reyes Bravo wrote: > I would like to work on the framework for v20, if nobody else is. Sounds good. > Some facts that make it look tractable: > > - Every write to st_progress_param goes through backend_progress.c > (pgstat_progress_update_param, _incr_param, _parallel_incr_param, > _update_multi_param, plus start/end_command). There are 163 calls in > 23 files, and none of them writes the array directly, so one hook > there sees every update. Yep. > - There is precedent for the switch in the DEVELOPER_OPTIONS trace_* > settings (trace_locks, trace_notify, trace_sort, ...). I think those are all pretty archaic, so I wouldn't necessarily base a design on them. > Before writing anything, three questions, so that I build what you have > in mind: > > 1. A runtime developer setting (say trace_progress, like trace_notify) > or something compiled in only for debug builds (like LOCK_DEBUG > around trace_locks)? I think a compile option is enough. We'll want a buildfarm animal that runs with that option set, but things set up in such a way that the (limited amount of) debug code is compiled out for regular developer builds, so that this doesn't cause "meson test" to be any slower. > 2. Should tests read the lines from the server log in TAP tests, or > from the client with client_min_messages in the regression suite? > Counters such as blocks scanned vary between runs, so I assume a test > would match phases and selected counters rather than every line. No opinion on this. Maybe a good frame would be a TAP test that runs REPACK/COPY/etc and then reads the debug output to see if the order of phase switching is from A to B to C, and that block numbers in column such-and-such are monotonically increasing within one phase, and that they get back to 0 when changing to phase X, etc. > 3. One line per call, or only when a value actually changes? I think emitting a line when nothing has changed would be pointless noise. > The first users would be VACUUM and REPACK, including the two > index_rebuild_count cases from this week. Sure, as long as it's not restricted to only cover them. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/