• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: コミット

firtst release


コミットメタ情報

リビジョン9adb78ee11ac473336a7d2e9741672025816fadc (tree)
日時2017-11-06 15:57:17
作者Kyotaro Horiguchi <horiguchi.kyotaro@lab....>
コミッターKyotaro Horiguchi

ログメッセージ

Remove mark_dummy_rel() from core.c

The function is exposed by the commit
f49842d1ee31b976c681322f76025d7732e860f3 so remove it from the file.

変更サマリ

差分

--- a/core.c
+++ b/core.c
@@ -3,7 +3,6 @@
33 * core.c
44 * Routines copied from PostgreSQL core distribution.
55 *
6-
76 * The main purpose of this files is having access to static functions in core.
87 * Another purpose is tweaking functions behavior by replacing part of them by
98 * macro definitions. See at the end of pg_hint_plan.c for details. Anyway,
@@ -40,7 +39,6 @@
4039 * join_is_legal()
4140 * has_join_restriction()
4241 * is_dummy_rel()
43- * mark_dummy_rel()
4442 * restriction_is_constant_false()
4543 *
4644 *
@@ -1404,50 +1402,6 @@ is_dummy_rel(RelOptInfo *rel)
14041402
14051403
14061404 /*
1407- * Mark a relation as proven empty.
1408- *
1409- * During GEQO planning, this can get invoked more than once on the same
1410- * baserel struct, so it's worth checking to see if the rel is already marked
1411- * dummy.
1412- *
1413- * Also, when called during GEQO join planning, we are in a short-lived
1414- * memory context. We must make sure that the dummy path attached to a
1415- * baserel survives the GEQO cycle, else the baserel is trashed for future
1416- * GEQO cycles. On the other hand, when we are marking a joinrel during GEQO,
1417- * we don't want the dummy path to clutter the main planning context. Upshot
1418- * is that the best solution is to explicitly make the dummy path in the same
1419- * context the given RelOptInfo is in.
1420- */
1421-static void
1422-mark_dummy_rel(RelOptInfo *rel)
1423-{
1424- MemoryContext oldcontext;
1425-
1426- /* Already marked? */
1427- if (is_dummy_rel(rel))
1428- return;
1429-
1430- /* No, so choose correct context to make the dummy path in */
1431- oldcontext = MemoryContextSwitchTo(GetMemoryChunkContext(rel));
1432-
1433- /* Set dummy size estimate */
1434- rel->rows = 0;
1435-
1436- /* Evict any previously chosen paths */
1437- rel->pathlist = NIL;
1438- rel->partial_pathlist = NIL;
1439-
1440- /* Set up the dummy path */
1441- add_path(rel, (Path *) create_append_path(rel, NIL, NULL, 0, NIL));
1442-
1443- /* Set or update cheapest_total_path and related fields */
1444- set_cheapest(rel);
1445-
1446- MemoryContextSwitchTo(oldcontext);
1447-}
1448-
1449-
1450-/*
14511405 * restriction_is_constant_false --- is a restrictlist just FALSE?
14521406 *
14531407 * In cases where a qual is provably constant FALSE, eval_const_expressions
旧リポジトリブラウザで表示