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 1x6qeZ-000TZf-0g for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Sep 2026 14:30:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x6qeY-007rmW-20 for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Sep 2026 14:30:26 +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 1x6qeX-007rmO-2Y for pgsql-hackers@lists.postgresql.org; Wed, 16 Sep 2026 14:30:26 +0000 Received: from fout-b5-smtp.messagingengine.com ([202.12.124.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x6qeT-00000000oJp-3CXu for pgsql-hackers@lists.postgresql.org; Wed, 16 Sep 2026 14:30:25 +0000 Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id BD24B1D0006A; Wed, 16 Sep 2026 10:30:19 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Wed, 16 Sep 2026 10:30:19 -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=1789569019; x= 1789655419; bh=FTwbViOp02zymUFI5oXKNexUArg+guxdJk2RNwHJcA0=; b=b tUDCqzIOfaCJCuuD4veZbjVR1FdPmfyZZ53QfrJCiOKFA3tuc2RMrnkoL7jfPId5 cLWKOtMTm2DSqc6S4/4a2n2TMBquDecVTUoDHm5DJ+QUjmKeSqg9+zgKcjPfqHQ5 wzJGp5KBkwDH7fUi2BQy0Z8Eq5OSACKGHr2PcEW+ubYg/PPpw9AowancXGxl1jId ErDAnKfXBsbKgQ4FjL1TJfw+orquDOCLeKU0kzWlV85xuHkjR3PBBM6nHnHZT/55 l9vjpvEv6Omi+uqHt7oE5pICoa5cFH4UwaA66Jz5meRXffZyUauq2EKST4VbzSAW U3ltAcPc/V/qfHdACx8Mg== 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=1789569019; x=1789655419; bh=F TwbViOp02zymUFI5oXKNexUArg+guxdJk2RNwHJcA0=; b=piJfYDRlJ6L2wqjzb 4/7LN/LmK1Imt+YPWwDOu2OzrLKFnEW1T6FHeiAKVmcTXdhi/guibEo2tjrWwsm9 4mnEdJG5hV+F3HQQfeuGEyk7+xHHG1rbWJfFNSkYp3h/3iR9xgLpudeQCjiFP3ao n+T7ug9dj6QtWBeo9POHgp4aex0gERd5Z7n+xbYTwlVFvABPp3FgFhKJakpUF0BW WSilQsAN6WDru3mGgkqZlLC6GuDe+RdviVB/GbgQMoJ7oJotYGcB2k+JYcSuclhJ oSsUvCL0jBysftsR7YxQso4RFWEiZKOp+XN2Fu+QNkosu6MyyFVwuyztj92YWEQc MbtZw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFsp5cIluCvFwWhINAEKRV6wFHjKhTDwQshB2Mnxi5tQJ0mqtvyt+lctiCPBm2B0j W+k95iklgfaj3SxFzcPOnDvNhzOflko+A9UN/Bb0GrndNeryWR6bUEeXNuLy0JnrlkjPua LXD3qLW0F3Jkn9SQ/XXNGANk2rQmeCmrP+sWRvdoih6+/Pj52EYDGDVFJMdLnq6I/z7r21 P/0xaCPGx0Ccr7qkWCIVTL3pgxxW+suLFhkzm+/Ytnq+k7acydRWSSd7Knc8RjHbmUClN2 nQghhywQSPuH1TvZhVST+m9LUshVybzlwQpLQTJjMDF6rDNfhPUV4pLnEghqJ0aoQ3nXnI 5BPVpzbezqXSc/7FLkrx5OV4XSAbZcyytEK+7sFju6YSj6WpclsOJl2Q1fkIEeElcdP8Q8 LU9RJ2U79sbxL950/FMMehFZuQ9ZwNWJcalHhwF6DCwCp62Q0sgaBqSpSR7g/osMNxwbl5 XP6qYDSApIpLQH54EPWPlfyeoXgrNjgjfU0HnoFWXEbGGCO+WrBL5eJpj995fukGz8si5G uaRhgWtvc7b6RBrU0wgRm7BjY7hReTw7YRmDWuPdauygfGfpzKqhR9UBt876TQtUsRN7/0 r1xL1tj1XA7IQbqTPlt0N6f8oYG+tpk713U2K1iHAZW5mDKsLI/cttXVr8nw X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 16 Sep 2026 10:30:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1789569016; bh=P0bY9LFplzZ5ASqKTU80dccoKhew4/oXdsD+t0NPR3Y=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=tdCWZKEkV1/qXCi3+aAkQCgbfbTAyKSyYqzjTYUcfdllQ4Dyjm10M87KbaFU+nKIe XyZd/x/s/g/t+euTD2q/Ms889XF1DcESpAqGVsPvgraFqxl24kQ/SfATpodDvYFchG zUKMbj3cmV36LedXv+xgv9mAWyKQlu0afJxG41M5nAOfyqA5Sfjx7JhxVguRp2I03f njYtQZkEKtlVCxp3q9P7CEA7sAPUm3hmJUZCG98hIm9dEOaAI4byrY7aIA39gebiEE OfY758FtXQZ0LoFVCffbOhJtgxZjsRMZ2HHRa0NyaPCksYBg6nIvbeTtvM/OTemISW fg1JJE9/8JXaw== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 8A47BB002DE; Wed, 16 Sep 2026 16:30:16 +0200 (CEST) Date: Wed, 16 Sep 2026 16:30:16 +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 Manu, On 2026-Sep-16, Manuel Reyes Bravo wrote: > Neither 4b445479f9e (TOAST index creation writing into > index_rebuild_count) nor 0765b48874a (the concurrent path not counting > its index builds) added a test, and both are easy to break again > without anyone noticing, since nothing checks the values the progress > views report. I don't like this idea, because it adds no systematic mechanism to test the progress-report feature as a whole. I don't see why REPACK should be the place to start testing this. Also, injection points seem the wrong tool for the job, even if you can achieve testing an increment of a single progress counter within an existing test. On the other hand, this proposed test uses the isolation framework, which is by construction complicated enough. Not that this one isolation test is particularly complicated; but other tests are, and we do not benefit from added complexity that only supports testing a feature unrelated to concurrency. As I said in a reply to Fujii in the thread for the patch you replied to in pgsql-committers, I think we need to come up with a test framework specific to observing progress report counters. (Maybe, and I'm just braindumping here, have them in debug mode print out a line for each individual counter update that's made, so that a test file can observe/match those lines somehow). That's more work upfront, but it can allow us systematically test all the counters in a coherent way. Thanks for spending time on this, -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Doing what he did amounts to sticking his fingers under the hood of the implementation; if he gets his fingers burnt, it's his problem." (Tom Lane)