Re: [HACKERS] why not parallel seq scan for slow functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] why not parallel seq scan for slow functions
Date
Msg-id 15448.1504720036@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] why not parallel seq scan for slow functions  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] why not parallel seq scan for slow functions
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Sep 5, 2017 at 4:34 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> Okay, now I understand your point, but I think we already change the
>> cost of paths in apply_projection_to_path which is done after add_path
>> for top level scan/join paths.

> Yeah. I think that's a nasty hack, and I think it's Tom's fault.  :-)

Yeah, and it's also documented:
* This has the same net effect as create_projection_path(), except that if* a separate Result plan node isn't needed,
wejust replace the given path's* pathtarget with the desired one.  This must be used only when the caller* knows that
thegiven path isn't referenced elsewhere and so can be modified* in-place.
 

If somebody's applying apply_projection_to_path to a path that's already
been add_path'd, that's a violation of the documented restriction.

It might be that we should just get rid of apply_projection_to_path and
use create_projection_path, which is less mistake-prone at the cost of
manufacturing another level of Path node.  Now that that has the dummypp
flag, it really shouldn't make any difference in terms of the accuracy of
the cost estimates.

> I'd feel a lot happier if Tom were to decide how this ought to be
> fixed, because - in spite of some modifications by various parallel
> query code - this is basically all his design and mostly his code.

I can take a look, but not right away.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: [HACKERS] [PATCH] Add citext_pattern_ops to citext contrib module
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Add psql variables showing serverversion and psql version.