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

Поиск
Список
Период
Сортировка
От Donghang Lin
Тема Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE
Дата
Msg-id CAA=D8a1G5CgvdWLd5_VCEc5Sa3rgJftcGfTEvYqG1HnjMBQmpA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE  (Melanie Plageman <melanieplageman@gmail.com>)
Ответы Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE  (Alena Rybakina <lena.ribackina@yandex.ru>)
Список pgsql-hackers
On Mon, Mar 25, 2024 at 2:11 PM Melanie Plageman <melanieplageman@gmail.com> wrote:
> As for whether or not per-worker stats should be displayed by default
> or only with VERBOSE, it sounds like there are two different
> precedents. I don't have a strong feeling one way or the other.
> Whichever is most consistent.
> Donghang, could you list again which plan nodes and explain options
> always print per-worker stats and which only do with the VERBOSE
> option?

I took a look at explain.c where workers info is printed out.

These works for every parallel aware nodes:
Buffers stats print for workers with VERBOSE and BUFFERS
WAL stats print for workers with VERBOSE and WAL
JIT stats print for workers with VERBOSE and COSTS
Timing print for workers with VERBOSE and TIMING
Rows and loops print for workers with VERBOSE

Some specific nodes:
Sort / Incremental Sort / Hash / HashAggregate / Memorize and Bitmap Heap Scan (this patch) nodes
always print their specific stats for workers.  

> I did some logging and I do see workers with
> counts of lossy/exact not making it into the final count. I haven't
> had time to debug more, but it is worth looking into.

Indeed, rescan overrides previous scan stats in workers.  
Attach v5 with v4 plus the fix to aggregate the counts.  

Regards,
Donghang Lin
(ServiceNow)
Вложения

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

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: pg_upgrade and logical replication
Следующее
От: Richard Guo
Дата:
Сообщение: Re: Remove some redundant set_cheapest() calls