Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Subject: Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)
Date: 2018-01-18 18:35:03
Message-ID: CAH2-WznTSsM+dw3Fh1XRW5+AdGwhoxfiHS0Nox1nCdA7WMR65w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 18, 2018 at 10:27 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Jan 18, 2018 at 1:14 PM, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
>> That seems pretty far fetched.
>
> I don't think it is, and there are plenty of other examples. All you
> need is a query plan that involves significant CPU work both below the
> Gather node and above the Gather node. It's not difficult to find
> plans like that; there are TPC-H queries that generate plans like
> that.

You need to have a very selective qual in the worker, that eliminates
most input (keeps the worker busy), and yet manages to keep the leader
busy rather than waiting on input from the gather.

>> But even if it wasn't, my position
>> would not change. This could happen only because the planner
>> determined that it was the cheapest plan when
>> parallel_leader_participation happened to be off. But clearly a
>> "degenerate parallel CREATE INDEX" will never be faster than a serial
>> CREATE INDEX, and there is a simple way to always avoid one. So why
>> not do so?
>
> That's an excellent argument for making parallel CREATE INDEX ignore
> parallel_leader_participation entirely.

I'm done making arguments about parallel_leader_participation. Tell me
what you want, and I'll do it.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-01-18 18:40:03 Re: GSoC 2018 Project Ideas & Mentors - Last Call
Previous Message Peter Geoghegan 2018-01-18 18:30:46 Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)