From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: parallel joins, and better parallel explain |
Date: | 2015-12-09 18:21:02 |
Message-ID: | CA+TgmoZ3TKanASH7JTF-kcXJKc9QYmoRw2T=LA85zz9JRQB_ZQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Dec 4, 2015 at 3:07 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> Do you think it will be useful to display in a similar way if worker
> is not able to execute plan (like before it starts execution, the other
> workers have already finished the work)?
Maybe, but it would clutter the output a good deal. I think we should
instead have the Gather node itself display the number of workers that
it actually managed to launch, and then the user can infer that any
execution nodes that don't mention those workers were not executed by
them.
> Other than that parallel-explain-v2.patch looks good.
OK, I'm going to go ahead and commit that part.
> I think the problem is at Gather node, the number of buffers (read + hit)
> are greater than the number of pages in relation. The reason why it
> is doing so is that in Workers (ParallelQueryMain()), it starts the buffer
> usage accumulation before ExecutorStart() whereas in master backend
> it always calculate it for ExecutorRun() phase, on changing it to accumulate
> for ExecutorRun() phase above problem is fixed. Attached patch fixes the
> problem.
Why is it a bad thing to capture the cost of doing ExecutorStart() in
the worker? I can see there's an argument that changing this would be
more consistent, but I'm not totally convinced. The overhead of
ExecutorStart() in the leader isn't attributable to any specific
worker, but the overhead of ExecutorStart() in the worker can fairly
be blamed on Gather, I think. I'm not dead set against this change
but I'm not totally convinced, either.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2015-12-09 18:31:06 | Re: Making tab-complete.c easier to maintain |
Previous Message | Jeremy Harris | 2015-12-09 18:13:59 | Re: Using quicksort for every external sort run |