Missing HashAgg EXPLAIN ANALYZE details for parallel plans - Mailing list pgsql-hackers

From David Rowley
Subject Missing HashAgg EXPLAIN ANALYZE details for parallel plans
Date
Msg-id CAApHDvpEKbfZa18mM1TD7qV6PG+w97pwCWq5tVD0dX7e11gRJw@mail.gmail.com
Whole thread Raw
Responses Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans
Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans
List pgsql-hackers
Hi,

Now that HashAgg can spill to disk, we see a few more details in
EXPLAIN ANALYZE than we did previously, e.g. Peak Memory Usage, Disk
Usage.  However, the new code neglected to make EXPLAIN ANALYZE show
these new details for parallel workers.

Additionally, the new properties all were using
ExplainPropertyInteger() which meant that we got output like:

                             QUERY PLAN
---------------------------------------------------------------------
 HashAggregate (actual time=31.724..87.638 rows=1000 loops=1)
   Group Key: a
   Peak Memory Usage: 97 kB
   Disk Usage: 3928 kB
   HashAgg Batches: 798
   ->  Seq Scan on ab (actual time=0.006..9.243 rows=100000 loops=1)

Where all the properties were on a line by themselves.  This does not
really follow what other nodes are doing, e.g sort:

                                QUERY PLAN
---------------------------------------------------------------------------
 GroupAggregate (actual time=47.530..70.935 rows=1000 loops=1)
   Group Key: a
   ->  Sort (actual time=47.500..59.344 rows=100000 loops=1)
         Sort Key: a
         Sort Method: external merge  Disk: 2432kB
         ->  Seq Scan on ab (actual time=0.004..8.476 rows=100000 loops=1)

Where we stick all the properties on a single line.

The attached patch fixes both the missing parallel worker information
and puts the properties on a single line for format=text.

I'd like to push this in the next few days.

David

Attachment

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Transactions involving multiple postgres foreign servers, take2
Next
From: Fujii Masao
Date:
Subject: Re: Creating a function for exposing memory usage of backend process