postgresql/src/backend/optimizer/path
Robert Haas 80558c1f5a Generate parallel sequential scan plans in simple cases.
Add a new flag, consider_parallel, to each RelOptInfo, indicating
whether a plan for that relation could conceivably be run inside of
a parallel worker.  Right now, we're pretty conservative: for example,
it might be possible to defer applying a parallel-restricted qual
in a worker, and later do it in the leader, but right now we just
don't try to parallelize access to that relation.  That's probably
the right decision in most cases, anyway.

Using the new flag, generate parallel sequential scan plans for plain
baserels, meaning that we now have parallel sequential scan in
PostgreSQL.  The logic here is pretty unsophisticated right now: the
costing model probably isn't right in detail, and we can't push joins
beneath Gather nodes, so the number of plans that can actually benefit
from this is pretty limited right now.  Lots more work is needed.
Nevertheless, it seems time to enable this functionality so that all
this code can actually be tested easily by users and developers.

Note that, if you wish to test this functionality, it will be
necessary to set max_parallel_degree to a value greater than the
default of 0.  Once a few more loose ends have been tidied up here, we
might want to consider changing the default value of this GUC, but
I'm leaving it alone for now.

Along the way, fix a bug in cost_gather: the previous coding thought
that a Gather node's transfer overhead should be costed on the basis of
the relation size rather than the number of tuples that actually need
to be passed off to the leader.

Patch by me, reviewed in earlier versions by Amit Kapila.
2015-11-11 09:02:52 -05:00
..
Makefile Extract restriction OR clauses whether or not they are indexable. 2013-12-30 12:24:37 -05:00
allpaths.c Generate parallel sequential scan plans in simple cases. 2015-11-11 09:02:52 -05:00
clausesel.c Allow planner to use expression-index stats for function calls in WHERE. 2015-09-24 18:35:46 -04:00
costsize.c Generate parallel sequential scan plans in simple cases. 2015-11-11 09:02:52 -05:00
equivclass.c Fix eclass_useful_for_merging to give valid results for appendrel children. 2015-08-06 20:14:53 -04:00
indxpath.c Collection of typo fixes. 2015-05-20 16:56:22 +03:00
joinpath.c Further mucking with PlaceHolderVar-related restrictions on join order. 2015-08-10 17:18:17 -04:00
joinrels.c Undo mistaken tightening in join_is_legal(). 2015-08-12 21:19:03 -04:00
pathkeys.c Fix eclass_useful_for_merging to give valid results for appendrel children. 2015-08-06 20:14:53 -04:00
tidpath.c Update copyright for 2015 2015-01-06 11:43:47 -05:00