• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revision16ae4df51584c0858728838af7506c0b01a44f32 (tree)
Time2020-10-29 20:31:47
AuthorKyotaro Horiguchi <horikyoga.ntt@gmai...>
CommiterKyotaro Horiguchi

Log Message

Update core.c and make_join_rel.c.

From this version core.c and make_join_rel.c are automatically
generated from core code. Adjust them to auto-generated content.

Change Summary

Incremental Difference

--- a/core.c
+++ b/core.c
@@ -12,11 +12,6 @@
1212 *
1313 * src/backend/optimizer/path/allpaths.c
1414 *
15- * static functions:
16- * set_plain_rel_pathlist()
17- * add_paths_to_append_rel()
18- * try_partitionwise_join()
19- *
2015 * public functions:
2116 * standard_join_search(): This funcion is not static. The reason for
2217 * including this function is make_rels_by_clause_joins. In order to
@@ -24,6 +19,11 @@
2419 * change the behavior of make_join_rel, which is called under this
2520 * function.
2621 *
22+ * static functions:
23+ * set_plain_rel_pathlist()
24+ * set_append_rel_pathlist()
25+ * create_plain_partial_paths()
26+ *
2727 * src/backend/optimizer/path/joinrels.c
2828 *
2929 * public functions:
@@ -36,11 +36,10 @@
3636 * join_is_legal()
3737 * has_join_restriction()
3838 * restriction_is_constant_false()
39- * update_child_rel_info()
4039 * build_child_join_sjinfo()
4140 * get_matching_part_pairs()
4241 * compute_partition_bounds()
43- *
42+ * try_partitionwise_join()
4443 *
4544 * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
4645 * Portions Copyright (c) 1994, Regents of the University of California
@@ -49,8 +48,8 @@
4948 */
5049
5150 static void populate_joinrel_with_paths(PlannerInfo *root, RelOptInfo *rel1,
52- RelOptInfo *rel2, RelOptInfo *joinrel,
53- SpecialJoinInfo *sjinfo, List *restrictlist);
51+ RelOptInfo *rel2, RelOptInfo *joinrel,
52+ SpecialJoinInfo *sjinfo, List *restrictlist);
5453
5554 /*
5655 * set_plain_rel_pathlist
@@ -266,6 +265,7 @@ standard_join_search(PlannerInfo *root, int levels_needed, List *initial_rels)
266265 return rel;
267266 }
268267
268+
269269 /*
270270 * create_plain_partial_paths
271271 * Build partial access paths for parallel scan of a plain relation
@@ -955,6 +955,7 @@ has_join_restriction(PlannerInfo *root, RelOptInfo *rel)
955955 return false;
956956 }
957957
958+
958959 /*
959960 * restriction_is_constant_false --- is a restrictlist just FALSE?
960961 *
@@ -1001,6 +1002,7 @@ restriction_is_constant_false(List *restrictlist,
10011002 return false;
10021003 }
10031004
1005+
10041006 /*
10051007 * Construct the SpecialJoinInfo for a child-join by translating
10061008 * SpecialJoinInfo for the join between parents. left_relids and right_relids
@@ -1043,6 +1045,7 @@ build_child_join_sjinfo(PlannerInfo *root, SpecialJoinInfo *parent_sjinfo,
10431045 return sjinfo;
10441046 }
10451047
1048+
10461049 /*
10471050 * get_matching_part_pairs
10481051 * Generate pairs of partitions to be joined from inputs
--- a/make_join_rel.c
+++ b/make_join_rel.c
@@ -5,7 +5,12 @@
55 * modifications.
66 *
77 * src/backend/optimizer/path/joinrels.c
8+ *
9+ * This file contains the following functions from corresponding files.
10+ *
11+ * static functions:
812 * make_join_rel()
13+ * populate_joinrel_with_paths()
914 *
1015 * Portions Copyright (c) 2013-2020, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
1116 * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
@@ -44,6 +49,7 @@ adjust_rows(double rows, RowsHint *hint)
4449 return result;
4550 }
4651
52+
4753 /*
4854 * make_join_rel
4955 * Find or create a join RelOptInfo that represents the join of
@@ -156,7 +162,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
156162 /*
157163 * If the rows_hint's target relids is not a subset of both of
158164 * component rels and is a subset of this joinrel, ths hint's
159- * targets spread over both component rels. This means that
165+ * targets spread over both component rels. This menas that
160166 * this hint has been never applied so far and this joinrel is
161167 * the first (and only) chance to fire in current join tree.
162168 * Only the multiplication hint has the cumulative nature so we
@@ -170,7 +176,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
170176 {
171177 /*
172178 * If a hint just for me is found, no other adjust method is
173- * useless, but this cannot be more than twice becuase this joinrel
179+ * useles, but this cannot be more than twice becuase this joinrel
174180 * is already adjusted by this hint.
175181 */
176182 if (justforme->base.state == HINT_STATE_NOTUSED)
@@ -217,6 +223,7 @@ make_join_rel(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2)
217223 return joinrel;
218224 }
219225
226+
220227 /*
221228 * populate_joinrel_with_paths
222229 * Add paths to the given joinrel for given pair of joining relations. The
Show on old repository browser