• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revision4343403e99a969092ae991880c1fadb8f40c816d (tree)
Time2020-10-29 20:29:28
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:
@@ -35,8 +35,9 @@
3535 * make_rels_by_clauseless_joins()
3636 * join_is_legal()
3737 * has_join_restriction()
38+ * mark_dummy_rel()
3839 * restriction_is_constant_false()
39- *
40+ * try_partitionwise_join()
4041 *
4142 * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
4243 * Portions Copyright (c) 1994, Regents of the University of California
@@ -45,8 +46,8 @@
4546 */
4647
4748 static void populate_joinrel_with_paths(PlannerInfo *root, RelOptInfo *rel1,
48- RelOptInfo *rel2, RelOptInfo *joinrel,
49- SpecialJoinInfo *sjinfo, List *restrictlist);
49+ RelOptInfo *rel2, RelOptInfo *joinrel,
50+ SpecialJoinInfo *sjinfo, List *restrictlist);
5051
5152 /*
5253 * set_plain_rel_pathlist
@@ -262,6 +263,7 @@ standard_join_search(PlannerInfo *root, int levels_needed, List *initial_rels)
262263 return rel;
263264 }
264265
266+
265267 /*
266268 * create_plain_partial_paths
267269 * Build partial access paths for parallel scan of a plain relation
@@ -1027,6 +1029,7 @@ restriction_is_constant_false(List *restrictlist,
10271029 return false;
10281030 }
10291031
1032+
10301033 /*
10311034 * Assess whether join between given two partitioned relations can be broken
10321035 * down into joins between matching partitions; a technique called
--- 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
@@ -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
--- a/update_copied_funcs.pl
+++ b/update_copied_funcs.pl
@@ -276,7 +276,7 @@ index 0e7b99f..287e7f1 100644
276276 + /*
277277 + * If the rows_hint's target relids is not a subset of both of
278278 + * component rels and is a subset of this joinrel, ths hint's
279-+ * targets spread over both component rels. This menas that
279++ * targets spread over both component rels. This means that
280280 + * this hint has been never applied so far and this joinrel is
281281 + * the first (and only) chance to fire in current join tree.
282282 + * Only the multiplication hint has the cumulative nature so we
@@ -290,7 +290,7 @@ index 0e7b99f..287e7f1 100644
290290 + {
291291 + /*
292292 + * If a hint just for me is found, no other adjust method is
293-+ * useles, but this cannot be more than twice becuase this joinrel
293++ * useless, but this cannot be more than twice becuase this joinrel
294294 + * is already adjusted by this hint.
295295 + */
296296 + if (justforme->base.state == HINT_STATE_NOTUSED)
Show on old repository browser