summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRobert Haas2017-08-31 19:50:18 +0000
committerRobert Haas2017-08-31 19:50:18 +0000
commit30833ba154e0c1106d61e3270242dc5999a3e4f3 (patch)
treede005dc4490d7e43a4e49e1fde5369396c6e38fa /src/test
parent6708e447efb5046c95bdcf900b6da97f56f97ae8 (diff)
Expand partitioned tables in PartDesc order.
Previously, we expanded the inheritance hierarchy in the order in which find_all_inheritors had locked the tables, but that turns out to block quite a bit of useful optimization. For example, a partition-wise join can't count on two tables with matching bounds to get expanded in the same order. Where possible, this change results in expanding partitioned tables in *bound* order. Bound order isn't well-defined for a list-partitioned table with a null-accepting partition or for a list-partitioned table where the bounds for a single partition are interleaved with other partitions. However, when expansion in bound order is possible, it opens up further opportunities for optimization, such as strength-reducing MergeAppend to Append when the expansion order matches the desired sort order. Patch by me, with cosmetic revisions by Ashutosh Bapat. Discussion: http://postgr.es/m/CA+TgmoZrKj7kEzcMSum3aXV4eyvvbh9WD=c6m=002WMheDyE3A@mail.gmail.com
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/insert.out4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/regress/expected/insert.out b/src/test/regress/expected/insert.out
index a2d9469592e..e159d62b66f 100644
--- a/src/test/regress/expected/insert.out
+++ b/src/test/regress/expected/insert.out
@@ -278,12 +278,12 @@ select tableoid::regclass, * from list_parted;
-------------+----+----
part_aa_bb | aA |
part_cc_dd | cC | 1
- part_null | | 0
- part_null | | 1
part_ee_ff1 | ff | 1
part_ee_ff1 | EE | 1
part_ee_ff2 | ff | 11
part_ee_ff2 | EE | 10
+ part_null | | 0
+ part_null | | 1
(8 rows)
-- some more tests to exercise tuple-routing with multi-level partitioning