Re: pg13dev: explain partial, parallel hashagg, and memory use - Mailing list pgsql-hackers

From David Rowley
Subject Re: pg13dev: explain partial, parallel hashagg, and memory use
Date
Msg-id CAApHDvo_rw8tix0PPRUTaaAjfm9uU_WHfmRy=4X3eSSpSqr5FA@mail.gmail.com
Whole thread Raw
In response to Re: pg13dev: explain partial, parallel hashagg, and memory use  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: pg13dev: explain partial, parallel hashagg, and memory use  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On Wed, 5 Aug 2020 at 14:13, Justin Pryzby <pryzby@telsasoft.com> wrote:
> Also odd (to me).  If I encourage more workers, there are "slots" for each
> "planned" worker, even though fewer were launched:

Looking at explain.c for "num_workers; " (including the final space at
the end), looking at each for loop that loops over each worker, quite
a number of those locations have a condition that skips the worker.

For example, show_sort_info() does

if (sinstrument->sortMethod == SORT_TYPE_STILL_IN_PROGRESS)
continue; /* ignore any unfilled slots */

So maybe Hash Agg should be doing something similar.  Additionally,
maybe it should not show the leader details if the leader didn't help.

David



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [DOC] Document concurrent index builds waiting on each other
Next
From: David Rowley
Date:
Subject: Re: Keep elog(ERROR) and ereport(ERROR) calls in the cold path