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 1wDGYA-002nJD-1Q for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Apr 2026 06:50: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 1wDGY9-004SWv-0Q for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Apr 2026 06:50:05 +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.96) (envelope-from ) id 1wDGY8-004SWm-2g for pgsql-hackers@lists.postgresql.org; Thu, 16 Apr 2026 06:50:04 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wDGY6-00000001H1t-25SX for pgsql-hackers@lists.postgresql.org; Thu, 16 Apr 2026 06:50:03 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-488a8ca4aadso90499725e9.3 for ; Wed, 15 Apr 2026 23:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776322201; x=1776927001; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cuZ/d00kUX4/aw3v9/drxeoYx7TmoLsaxWL0qWPZyPg=; b=Xbs/qNjjBi/k6ufd3ZvQrWXgjk7AwDClTPoqFb+r/ivTPex6WH7OXrOTRTemZNVDsM fYEhQhitxlg89xMBFYvZ/9JaeVEsNdUg+o5NuzRmHjHfAmjnxQGbigGFJBe/ZjOTT6TR 924P3kKJbphSovRZus07uRbbx64EHO0Xd/yVj7ulb1jnEsi4DYpXPzAw4Mr+h6zH7BKE 7QKnTb83079l/qJ0qYfVT3ocKeJOMfyzI31Q/JYCxV8oh7yPJxEMVyJpsCDIOhNNDaF9 HnPVFrDN7Layxd9TnEfNSuWi9VapDyVLRVv+QYbxjGBkEZ/eL7CJR/2PXbChdyIu7YCx zdfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776322201; x=1776927001; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cuZ/d00kUX4/aw3v9/drxeoYx7TmoLsaxWL0qWPZyPg=; b=KTP5JVFpIxol1ZsDxvYkeuXti+7LfyHXt4C5u7Nth2FuQ0CjacVXeatS+1YO+uH7Ds ClNzdtdN7Cy/n+BJCUZVrnSky5GEX5zb7gNsyye5lpNiq9tXk6q5U0Ut3JdGDt95z5ai Q91U5XOYbjgLGIIYW095cvTgtLpgfG53L1rZM2uFpbYTpi86hDGfpdp1ecF+pBqUZ+u2 F+Ka7rI0lcWQeR97G6uBei2rsU6x7h8bMTf/L1qzaMDtz6T5chOegSKgi0Bte+SnE/+k qkaW6foIVv90TthZrHFiM58Pv1hZteK1iW7vovAKiozh/Md16zywBhU+KjpkD0aGduku aQaQ== X-Forwarded-Encrypted: i=1; AFNElJ+E+AQDvJjBayUGKPKp0qur9Pnnon0Td62e8EnbFT/X7JP2TtsREC3b/y/qsKFy0Dz2dxoww9rELCuGu670@lists.postgresql.org X-Gm-Message-State: AOJu0Yz5hT6ybzrwUxlDc5htoGS6+cnf8T1BRGy9AEcHCAp4VfcCO1ub IRK4F0CLBXKvJ5qqJOVVYCdUBbCm5Y2RyQvKr5ZAbIs9Sk/DGneo5vZV X-Gm-Gg: AeBDietoJ6HxbX/hP9XwiXnfScZmMMRhMOPyQjIM8n2YVa8nzfc0TTVyCBWhr/WQaNW FnD1YahgiPUXzvI6QboY0q0JzLa9+x9qFpaojE9m80lvUsGpWLzJDifQOgUzKJBKa35GCdFoVkD OgTCg/11jvM4rgY9Xi2lD2KPoNZqQD7p83TOkymcMVRFAJpnoqNFzbGKx1tx54cJlGMNDoRrM7A wP17hS5a66bVOPH2AQsKk/5ALS4nZ1VcCkJ9kTTEIchDeorXvGbE9FrO0ewxOuzgr6VOkuhwUyq zdersrOdXWDeYemcp4u/I6Y1arKMnD1hx2mcKBlx1GuLz1ewohDLrFG3fUt82aSPP6F/2AhrOeq iBYR+wPtrR28PEmZuqqEFMhNVzjRrXQgHF9rbTTYcwmxmkDgxAPKQWtvVVdC4MnJj+rMvM+SWlX kpMupLxf8dcgvvUXpM7/dCATawM/o9yItGmtQ= X-Received: by 2002:a05:600c:3149:b0:488:acbc:b2e with SMTP id 5b1f17b1804b1-488d68431f6mr328999475e9.17.1776322201226; Wed, 15 Apr 2026 23:50:01 -0700 (PDT) Received: from [172.31.5.233] ([165.225.27.16]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488f092cffbsm71672855e9.1.2026.04.15.23.49.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Apr 2026 23:50:00 -0700 (PDT) Message-ID: <326831c0-df02-435a-8c2c-428d59222a91@gmail.com> Date: Thu, 16 Apr 2026 08:49:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE To: Melanie Plageman , Tomas Vondra Cc: David Rowley , Masahiro.Ikeda@nttdata.com, lena.ribackina@yandex.ru, donghanglin@gmail.com, tomas.vondra@enterprisedb.com, dilipbalaut@gmail.com, pgsql-hackers@lists.postgresql.org, hlinnaka@iki.fi References: <13bd913f-94b6-43cf-b849-4d762e5297d8@yandex.ru> Content-Language: en-US From: David Geier In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Tomas! On 05.04.2026 20:27, Melanie Plageman wrote: > On Fri, Apr 3, 2026 at 3:20 PM Tomas Vondra wrote: >> >> I'm working on adding information about prefetching for scans [1], which >> includes BitmapHeapScan. I realized the instrumentation added by this >> thread may not be quite right, resulting in missing instrumentation for >> non-parallel-aware scans in a parallel query. >> >> A better description / explanation of the issue is posted here [2]. I've >> posted a proposed fix in the following message [3], in a patch: >> >> v8-0002-Show-Bitmap-Heap-Scan-stats-for-non-parallel-awar.patch I haven't spent a lot of time looking through the code and your patch but I'm wondering why we're not rather missing a ExecBitmapIndexScanInstrumentEstimate(), rather than calling ExecBitmapIndexScanEstimate() also in the !parallel_aware case. All other scans do it this way, so why do it differently for Bitmap Index Scan? >> I wonder if someone from this thread could review my analysis, and >> confirm this is not intentional. I don't see it discussed in the thread, >> so I assume no one noticed this behavior. I'd also appreciate a review >> of the proposed fix, or suggestions for alternative fixes. > > I can't imagine this was intentional. Agreed. -- David Geier