postgresql/src/backend
Robert Haas 7d8f6986b8 Fix parallel query so it doesn't spoil row estimates above Gather.
Commit 45be99f8cd removed GatherPath's
num_workers field, but this is entirely bogus.  Normally, a path's
parallel_workers flag is supposed to indicate the number of workers
that it wants, and should be 0 for a non-partial path.  In that
commit, I mistakenly thought that GatherPath could also use that field
to indicate the number of workers that it would try to start, but
that's disastrous, because then it can propagate up to higher nodes in
the plan tree, which will then get incorrect rowcounts because the
parallel_workers flag is involved in computing those values.  Repair
by putting the separate field back.

Report by Tomas Vondra.  Patch by me, reviewed by Amit Kapila.

Discussion: http://postgr.es/m/f91b4a44-f739-04bd-c4b6-f135bd643669@2ndquadrant.com
2017-03-31 21:01:20 -04:00
..
access Don't use bgw_main even to specify in-core bgworker entrypoints. 2017-03-31 20:43:32 -04:00
bootstrap Cast result of copyObject() to correct type 2017-03-28 21:59:23 -04:00
catalog Don't allocate storage for partitioned tables. 2017-03-31 16:28:51 -04:00
commands For foreign keys, check REFERENCES privilege only on the referenced table. 2017-03-31 18:11:30 -04:00
executor Make new expression eval code reject references to dropped columns. 2017-03-28 18:05:14 -04:00
foreign Spelling fixes in code comments 2017-03-14 12:58:39 -04:00
lib Support hashed aggregation with grouping sets. 2017-03-27 04:20:54 +01:00
libpq Fix unportable disregard of alignment requirements in RADIUS code. 2017-03-26 17:35:35 -04:00
main Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nodes Fix parallel query so it doesn't spoil row estimates above Gather. 2017-03-31 21:01:20 -04:00
optimizer Fix parallel query so it doesn't spoil row estimates above Gather. 2017-03-31 21:01:20 -04:00
parser Revert "Allow ON CONFLICT .. DO NOTHING on a partitioned table." 2017-03-31 16:48:21 -04:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Fix WaitEventSetWait() to handle write-ready waits properly on Windows. 2017-03-17 14:58:06 -04:00
postmaster Don't use bgw_main even to specify in-core bgworker entrypoints. 2017-03-31 20:43:32 -04:00
regex ICU support 2017-03-23 15:28:48 -04:00
replication Don't use bgw_main even to specify in-core bgworker entrypoints. 2017-03-31 20:43:32 -04:00
rewrite Cast result of copyObject() to correct type 2017-03-28 21:59:23 -04:00
snowball Add ICU_FLAGS to one more place 2017-03-23 16:53:10 -04:00
statistics Fix uninitialized memory propagation mistakes 2017-03-27 14:52:19 -03:00
storage Allow DSM segments to be created as pinned 2017-03-28 19:44:30 -03:00
tcop Cast result of copyObject() to correct type 2017-03-28 21:59:23 -04:00
tsearch Full Text Search support for json and jsonb 2017-03-31 14:26:03 -04:00
utils Fix typos. 2017-03-31 20:18:11 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk ICU support 2017-03-23 15:28:48 -04:00
Makefile Implement multivariate n-distinct coefficients 2017-03-24 14:06:10 -03:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00