Re: [HACKERS] make Gather node projection-capable

2015-10-25 Thread Robert Haas
On Sun, Oct 25, 2015 at 11:59 AM, Simon Riggs wrote: > On 22 October 2015 at 16:01, Robert Haas wrote: >> If we make Gather projection-capable, >> we can just end up with Gather->PartialSeqScan. > > Is there a reason not to do projection in the Gather node? I don't see one. I don't see one eithe

Re: [HACKERS] make Gather node projection-capable

2015-10-25 Thread Simon Riggs
On 22 October 2015 at 16:01, Robert Haas wrote: > If we make Gather projection-capable, > we can just end up with Gather->PartialSeqScan. > Is there a reason not to do projection in the Gather node? I don't see one. > > That said, I don't understand Tom's comment either. Surely the planner >

Re: [HACKERS] make Gather node projection-capable

2015-10-23 Thread Robert Haas
On Thu, Oct 22, 2015 at 2:49 PM, Robert Haas wrote: > You probably would, but sometimes that might not be possible; for > example, the tlist might contain a parallel-restricted function (which > therefore has to run in the leader). Oh, also: pushing down the tlist is actually sorta non-trivial at

Re: [HACKERS] make Gather node projection-capable

2015-10-22 Thread Robert Haas
On Thu, Oct 22, 2015 at 3:18 PM, Alvaro Herrera wrote: >> You probably would, but sometimes that might not be possible; for >> example, the tlist might contain a parallel-restricted function (which >> therefore has to run in the leader). > > I don't understand your reply. Failing to parallelize t

Re: [HACKERS] make Gather node projection-capable

2015-10-22 Thread Alvaro Herrera
Robert Haas wrote: > On Thu, Oct 22, 2015 at 1:38 PM, Tom Lane wrote: > > Robert Haas writes: > >> The Gather node, as currently committed, is neither projection-capable > >> nor listed as an exception in is_projection_capable_plan. Amit > >> discovered this in testing, and I hit it in my testin

Re: [HACKERS] make Gather node projection-capable

2015-10-22 Thread Robert Haas
On Thu, Oct 22, 2015 at 1:38 PM, Tom Lane wrote: > Robert Haas writes: >> The Gather node, as currently committed, is neither projection-capable >> nor listed as an exception in is_projection_capable_plan. Amit >> discovered this in testing, and I hit it in my testing as well. We >> could just

Re: [HACKERS] make Gather node projection-capable

2015-10-22 Thread Tom Lane
Robert Haas writes: > The Gather node, as currently committed, is neither projection-capable > nor listed as an exception in is_projection_capable_plan. Amit > discovered this in testing, and I hit it in my testing as well. We > could just mark it as being not projection-capable, but I think it

[HACKERS] make Gather node projection-capable

2015-10-22 Thread Robert Haas
The Gather node, as currently committed, is neither projection-capable nor listed as an exception in is_projection_capable_plan. Amit discovered this in testing, and I hit it in my testing as well. We could just mark it as being not projection-capable, but I think it might be better to go the oth