Missing HashAgg EXPLAIN ANALYZE details for parallel plans

Поиск
Список
Период
Сортировка
От David Rowley
Тема Missing HashAgg EXPLAIN ANALYZE details for parallel plans
Дата
Msg-id CAApHDvpEKbfZa18mM1TD7qV6PG+w97pwCWq5tVD0dX7e11gRJw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans  (Justin Pryzby <pryzby@telsasoft.com>)
Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans  (Jeff Davis <pgsql@j-davis.com>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Transactions involving multiple postgres foreign servers, take2
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Creating a function for exposing memory usage of backend process