Re: [HACKERS] CREATE TABLE with parallel workers, 10.0? - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [HACKERS] CREATE TABLE with parallel workers, 10.0?
Date
Msg-id 20170216012020.GY9812@tamriel.snowman.net
Whole thread Raw
In response to Re: [HACKERS] CREATE TABLE with parallel workers, 10.0?  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] CREATE TABLE with parallel workers, 10.0?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
All,

* Andres Freund (andres@anarazel.de) wrote:
> On 2017-02-15 08:48:44 -0500, Robert Haas wrote:
> > The other way of fixing this problem is to have each worker generate a
> > subset of the tuples and funnel them all back to the leader through a
> > Gather node; the leader then does all the inserts.  That avoids having
> > to solve the problems mentioned above, but it probably doesn't perform
> > nearly as well.
>
> I think it'd already be tremendously useful however.  I think it'd not
> be an unreasonable first step. It'd be a good fallback that'd be useful
> for !insert and such anyway.

Absolutely.  I had always figured this would be what we would do first,
before coming up with something more clever down the road.  In
particular, this allows filters to be pushed down and performed in
parallel, which may significantly reduce the result which is passed back
up to the leader.

In many cases, I expect this would work just as well, if not better,
than trying to actually do writes in parallel.

Thanks!

Stephen

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] CREATE TABLE with parallel workers, 10.0?
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] CREATE TABLE with parallel workers, 10.0?