• R/O
  • HTTP
  • SSH

pg_hint_plan: コミット一覧

firtst release

Rev. 日時 作者
3851f42 PG96 2018-12-05 17:32:15 Kyotaro Horiguchi

Fix for union-on-inheritance case

setup_hint_enforcement may pick up a wrong hint when multiple
subqueries access inheritance tables. This leads to failure to apply
hints on other than the first subquery.

6b05ac6 2018-12-05 17:32:10 Kyotaro Horiguchi

Don't reset plpgsql nest level at every command end

Clean up code for global exit is forgetting about loops that run
hinted commands multiple times. This leads to pg_hint_plan's failure
to affect after the first execution of the inner commands.
The hint below worked only for the first time.

FOR outer IN EXECUTE 'outer-command' LOOP
FOR inner IN EXECUTE '/*+ hint */ inner-command' LOOP

9df458b REL96_1_2_4 2018-11-13 16:33:08 Kyotaro Horiguchi

Changed version to 1.2.4

Previously parse_messages and message_level were binded to the same
internal variable. Separate the two GUCs. On the way doing this some
mssages that did not honor the variable were fixed. Default behavior
is not changed but the the two variables works differently from the
previous version, perhaps closer to expected.

d6c600f 2018-11-13 16:24:07 Kyotaro Horiguchi

Fix debug output level control

Previously parse_messages and message_level were binded to the same
internal variable. Separate the two GUCs. On the way doing this some
mssages that did not honor the variable were fixed. Default behavior
is not changed but the the two variables works differently from the
previous version, perhaps closer to expected.

d11ab49 2018-11-13 16:23:45 Kyotaro Horiguchi

Fix bogus error handling

For somewhat reason set_config_int32_options does bogus error
handling. Howerver that error cannot be happen, fixed it.

33ee9d0 REL96_1_2_3 2018-06-08 14:48:36 Kyotaro Horiguchi

Change version to 1.2.3.

1.2.2 has a crash bug in Describe message of extended protocol
path. If server receives the message after invalidation of
corresponding query cache, pg_hint_plan crashes.

On the way fixing it, this version took in the following commit of

64ad85860c Change more places to be less trusting of RestrictInfo.is_pushed_down.

1935002 2018-06-08 14:48:36 Kyotaro Horiguchi

Took in core improvement.

Took in the following commit of core. A minor non-functional fix was
made on the way.

64ad85860c Change more places to be less trusting of RestrictInfo.is_pushed_down.

Fixed typos and removed useless include on the way.

2e0d63f 2018-05-24 18:26:31 Kyotaro Horiguchi

Fix a crash bug in case debug_query_string is NULL

pg_hint_plan believed that debug_query_string cannot be null when
parse_analyze is called, but for example in the case under
exec_describe_statement_message, it is not. We see the query string in
pstate even in the case, so use it instead in the case. Since pstate
is storing the query of the lowermost level, we should use
debug_query_string in other cases.

5d887c9 2017-11-06 15:39:31 Kyotaro Horiguchi

Move expected/ut-W.out to output/ut-W.source

ut-W.out contained an absolute path of my working directory. Moved the
file into output so that we can remove the path replacing with

7093908 2017-11-06 15:10:26 Kyotaro Horiguchi

Added and removed some entries in .gitignore

Removed core.c, that is not appropriate.
Added .deps and RPMS.

e40ba9a 2017-11-06 14:00:23 Arthur Zakirov

Use pg_strcasecmp instead of strcasecmp for the sake of portability

de15cdb 2017-10-10 12:35:22 Kyotaro Horiguchi

Added a notice in the manual.

Added an item that explains about letter case handling of object names
in hints.

70f2c6a REL96_1_2_2 2017-07-27 19:20:50 Kyotaro Horiguchi

Change version to 1.2.2

1.2.1 has an assertion failure bug raised by DECLARE CURSOR with
enabling table hint. Fixed it.

e59da6d 2017-07-27 19:20:42 Kyotaro Horiguchi

Fixed a crash bug by DECLARE CURSOR and enable_hint_table = on

The previous version causes assertion failure by DECLARE CURSOR syntax
when table hint is activated. The cause is that the version forgot the
fact that DelcareCursorStmt is in a bit strange shape. Add support of
DECLARE CURSOR and regression test for table hinting.

d9112d9 2017-07-27 19:20:31 Kyotaro Horiguchi

Make core.c to the right version.

core.c in 9e5b1753d00cb1071eb44570d3c7f9e18823ba67 seems to be
somewhat different version. Fixed it to right version.

7500037 REL96_1_2_1 2017-05-19 13:33:31 Kyotaro Horiguchi

Change version to 1.2.1

1.2.0 has a crash bug raised by queries in specific shape involving
complex views and/or SQL functions. Also it can crash when using
Parallel hint.

They are fixed in this version.

6e611f2 2017-05-19 11:12:14 Kyotaro Horiguchi

Fix a bug of target query retrieval

The previous patch leaves a bug that get_query_string returns a Query
that JumbleQuery doesn't accept. This fixes that bug.

89149ce 2017-05-18 19:51:48 Kyotaro Horiguchi

Fix a crash bug on complex views when enable_hint_table is on

The Query that planner receives sometimes irrelevant to
debug_query_string. If enable_hint_table is on, pg_hint_plan_planner
normalizes debug_query_string using query-jumble information created
from the irrelevant Query the can lead to crash. To avoid this
situation, retrieve hints in post_parse_analyze_hook, where
corresponding pairs of a query string and a parsed Query.

90e4bf1 2017-05-18 18:45:37 Kyotaro Horiguchi

Follow the behavioral change of parallel execution

The behavior of parallel planning is changed until 9.6.3, let
expected/ut-W.out to follow that.

ab89e33 2017-05-18 18:45:25 Kyotaro Horiguchi

Fix a bug of Parallel hint

During manipulation on pathlist of a GatherPath, foreach was mitakenly
used for a loop using list_delete_cell. This leads to a crash with

a5f9aa7 REL96_1_2_0 2017-02-21 09:34:20 Kyotaro Horiguchi

Provide upgrade path from 1.1.3

pg_hint_plan96-1.2.0 has an upgrade path from 1.1.3. This adds
requires installation sql file and puts pointers to the files in
Makefile and spec file. It is the only upgrade path of pg_hint_plan
1.2.0 since it works only on PG9.6 and versions earlier than 1.1.3
don't support PG9.6.

7dc46bf 2017-02-21 09:11:45 Kyotaro Horiguchi

Don't apply parallel hint on rels that planner considers unsafe.

pg_hint_plan considered had its own decision logic on whether
parallel-safe or not but it is dangerous and unnecessary. Just follow
planner's decision.

0073a06 2017-02-21 09:11:45 Kyotaro Horiguchi

Reconsider hinting process

I rethinked the steps of enforcement considering the parallel planning
code. pg_hint_plan_set_rel_pathlist() gets simpler and easier to read

As the result of this patch, some behaviors has been changed.

- False generation of gahter path caused by hinting on the other side
of joins.

- Scan hints work with Parallel hints. (It's useless for the moment,

7c0ace5 2017-02-21 09:11:44 Tatsuro Yamada

Fix a typo of documentation.

Author: Tatsuro Yamada <yamatattsu@gmail.com>

b5e8200 2017-02-21 09:11:44 Kyotaro Horiguchi

Don't set_plain_rel_pathlist for other than RTE_RELATION.

pg_hint_plan_set_rel_pathlist can call set_plain_rel_pathlist for
relations other than RTE_RELATION and this results in a crash.

1217a7c 2017-02-21 09:11:44 Kyotaro Horiguchi

Following a fix in PG9.6.1.

PG9.6.2 gets a fix on planning that affects on the result of
ut-S. ut-S follows that by this fix. As the result ut-S won't success
for 9.6.1 or ealier after this patch.

5da6c04 2017-02-21 09:11:44 Kyotaro Horiguchi

Fix parallel hint error handling.

Some kind of error of a parallel hint resulted confusing log
output. Addition to that, due to improper assumption of .conf file,
ordinary setup of max_worker_processes caused failure of ut-W. Fixed

3597f38 2017-02-21 09:11:44 Kyotaro Horiguchi

Refactor hint application mechamism next step

I removed useless code forgotten to be removed in
add_paths_to_joinrel_wrapper by the previous refactoring. Addition to
that, find_scan_method_hint and find_parallel_hint are found not to
require the third parameter rel, so removed it. Some inadequate tests
are fixed and changed according to change of unclear behaviors.

ee3d73e 2017-02-21 09:11:44 Kyotaro Horiguchi

Improve error handling of Parallel hint

Improve poor error report for Parallel hint.

071eb53 2017-02-21 09:11:44 Kyotaro Horiguchi

Fix wrongly lowering max_parallel_workers_per_gather

Number of parallel workers of non-hinted relations is wrongly forced
to be zero even if max_parallel_workers_per_gather is more than
zero. Non-hinted relations get to have max_parallel_workes_per_gather
as set by this fix.