summaryrefslogtreecommitdiff
path: root/src/tutorial
diff options
context:
space:
mode:
authorTomas Vondra2017-10-05 15:21:43 +0000
committerTomas Vondra2017-10-19 13:48:20 +0000
commitb7ab508b85a00dabff8beaa14af7121ab00b42cb (patch)
treebe0d6085adb06b1e97ef5f41b67caae1ff223c16 /src/tutorial
parentae303694650b383f540702d7290c6fe7be7d6d8c (diff)
Fix handling of root->distribution during redistribution
This fixes some remaining bugs in handling root->distribution, caused by the upper-planner pathification (in PostgreSQL 9.6). Prior to the pathification (so in PostgreSQL 9.5 and Postgres-XL 9.5), the root->distribution was used for two purposes: * To track distribution expected by ModifyTable (UPDATE,DELETE), so that grouping_planner() knew how to redistribute the data. * To communicate the resulting distribution from grouping_planner() back to standard_planner(). This worked fine in 9.5 as grouping_planner() was only dealing with a single remaining path (plan) when considering the redistribution, and so it was OK to tweak root->distribution. But since the pathification in 9.6 that is no longer true. There is no obvious reason why all the paths would have to share the same distribution, and we don't know which one will be the cheapest one. So from now on root->distribution is used to track the distribution expected by ModifyTable. Distribution for each path is available in path->distribution if needed. Note: We still use subroot->distribution to pass information about distribution of subqueries, though. But we only set it after the one cheapest path is selected.
Diffstat (limited to 'src/tutorial')
0 files changed, 0 insertions, 0 deletions