Ensure all partitions of a partitioned table has the same distribution.
authorPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 11 Jul 2017 08:34:11 +0000 (14:04 +0530)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 11 Jul 2017 08:34:11 +0000 (14:04 +0530)
commit93cbab90b0c6fc3fc4aa515b93057127c0ee8a1b
treedec7870dad1f426e2c85e05c8b288d42d185f3f7
parent7ba7029dab2d1f347475cb0cc670442e413b0590
Ensure all partitions of a partitioned table has the same distribution.

To optimise and simplify XL's distributed query planning, we enforce that all
partitions of a partitioned table use the same distribution strategy. We also
put further restrictions that all columns in the partitions and the partitioned
table has matching positions. This can cause some problems when tables have
dropped columns etc, but we think it's far better to optimise XL's plans than
supporting all corner cases. We can look at removing some of these
restrictions later once the more usual queries run faster.

These restrictions allow us to unconditionally push down Append and MergeAppend
nodes to datanodes when these nodes are processing partitioned tables.

Some regression tests currently fail because of these added restrictions. We
would look at them in due course of time.
src/backend/commands/tablecmds.c
src/backend/optimizer/util/pathnode.c