Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: David Rowley <dgrowleyml(at)gmail(dot)com>, Masahiro(dot)Ikeda(at)nttdata(dot)com
Cc: lena(dot)ribackina(at)yandex(dot)ru, donghanglin(at)gmail(dot)com, geidav(dot)pg(at)gmail(dot)com, melanieplageman(at)gmail(dot)com, tomas(dot)vondra(at)enterprisedb(dot)com, dilipbalaut(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, hlinnaka(at)iki(dot)fi
Subject: Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE
Date: 2026-04-03 19:20:16
Message-ID: dbd45d67-8fb9-464f-b3ed-6fe185f8c8c9@vondra.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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 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.

regards

[1]
https://www.postgresql.org/message-id/a177a6dd-240b-455a-8f25-aca0b1c08c6e%40vondra.me

[2]
https://www.postgresql.org/message-id/3bdbc70d-ad44-494a-8aab-868b5066fe8b%40vondra.me

[3]
https://www.postgresql.org/message-id/fce326bb-1210-4d48-8c97-bb3bca396eba%40vondra.me

--
Tomas Vondra

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2026-04-03 19:27:58 Re: Docs: Distinguish table and index storage parameters in CREATE TABLE
Previous Message Sami Imseih 2026-04-03 19:13:16 Re: Add pg_stat_autovacuum_priority