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

David Geier <geidav.pg@gmail.com>

From: David Geier <geidav.pg@gmail.com>
To: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2023-02-21T12:02:35Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Show Parallel Bitmap Heap Scan worker stats in EXPLAIN ANALYZE

  2. Widen lossy and exact page counters for Bitmap Heap Scan

  3. Remove redundant snapshot copying from parallel leader to workers

Attachments

Hi,

On 1/20/23 09:34, David Geier wrote:
> EXPLAIN ANALYZE for parallel Bitmap Heap Scans currently only reports 
> the number of heap blocks processed by the leader. It's missing the 
> per-worker stats. The attached patch adds that functionality in the 
> spirit of e.g. Sort or Memoize. Here is a simple test case and the 
> EXPLAIN ANALYZE output with and without the patch:

Attached is a rebased version of the patch. I would appreciate someone 
taking a look.

As background: the change doesn't come out of thin air. We repeatedly 
took wrong conclusions in our query analysis because we assumed that the 
reported block counts include the workers.

If no one objects I would also register the patch at the commit fest. 
The patch is passing cleanly on CI.

-- 
David Geier
(ServiceNow)