pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix parallel query so it doesn't spoil row estimates above Gathe 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix parallel query so it doesn't spoil row estimates above Gathe @ 2017-04-01 01:13 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2017-04-01 01:13 UTC (permalink / raw) To: pgsql-committers Fix parallel query so it doesn't spoil row estimates above Gather. Commit 45be99f8cd5d606086e0a458c9c72910ba8a613d 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 Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/7d8f6986b83c9a56f6ea11c959cdd8f52e1b543d Modified Files -------------- src/backend/nodes/outfuncs.c | 1 + src/backend/optimizer/plan/createplan.c | 2 +- src/backend/optimizer/util/pathnode.c | 7 ++++--- src/include/nodes/relation.h | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix parallel query so it doesn't spoil row estimates above Gathe @ 2017-04-01 01:13 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2017-04-01 01:13 UTC (permalink / raw) To: pgsql-committers Fix parallel query so it doesn't spoil row estimates above Gather. Commit 45be99f8cd5d606086e0a458c9c72910ba8a613d 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 Branch ------ REL9_6_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/fb1879c374581c0f0e251e94c0087c8385b91f5b Modified Files -------------- src/backend/nodes/outfuncs.c | 1 + src/backend/optimizer/plan/createplan.c | 2 +- src/backend/optimizer/util/pathnode.c | 7 ++++--- src/include/nodes/relation.h | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-04-01 01:13 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-04-01 01:13 pgsql: Fix parallel query so it doesn't spoil row estimates above Gathe Robert Haas <rhaas@postgresql.org> 2017-04-01 01:13 pgsql: Fix parallel query so it doesn't spoil row estimates above Gathe Robert Haas <rhaas@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox