Re: Parallel leader process info in EXPLAIN

From: James Coleman <jtc331(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel leader process info in EXPLAIN
Date: 2020-03-17 22:21:58
Message-ID: CAAaqYe9LEC3zM5UOxuhGv5eb1BC4ycFEPNPCG2As13sOTi2UeQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 7, 2019 at 9:48 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
>
> On Thu, Nov 7, 2019 at 11:37 PM Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com> wrote:
> > ...
> > Also, I noticed that the worker details are displayed for sort node even without verbose, but for scans it is only with verbose. Am I missing something or there is something behind? However, I am not sure if this is the introduced by this patch-set.
>
> Yeah, it's a pre-existing thing, but I agree it's an interesting
> difference. We currently don't have a way to show a 'combined'
> version of a parallel (oblivious) sort: we always show the per-process
> version, and all this patch changes is how we label the leader's
> stats. I suppose someone could argue that in non-VERBOSE mode we
> should show the total memory usage (sum from all processes). I suppose
> it's possible they use different sort types (one worker runs out of
> work_mem and another doesn't), and I'm not sure how how you'd
> aggregate that.

Over at [1] (incremental sort patch) I had a similar question, since
each sort node (even non-parallel) can execute multiple tuplesorts.
The approach I took was to show both average and max for both disk and
memory usage as well as all sort strategies used. It looks like this:

-> Incremental Sort
Sort Key: a, b
Presorted Key: a
Full-sort Groups: 4 (Methods: quicksort) Memory: 26kB (avg), 26kB (max)
-> Index Scan using idx_t_a...

It'd be great if that had a use here too :)

James

[1]: https://www.postgresql.org/message-id/CAAaqYe_ctGqQsauuYS5StPULkES7%3Dt8vNwvEPyzXQdbjAuZ6vA%40mail.gmail.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2020-03-17 23:15:05 Re: Error on failed COMMIT
Previous Message Laurenz Albe 2020-03-17 21:55:32 Re: Berserk Autovacuum (let's save next Mandrill)