• R/O
  • HTTP
  • SSH

pg_hint_plan: List of commits

firtst release

Rev. Time Author
a9bcfa7 PG11 2020-02-17 21:08:03 Kyotaro Horiguchi

Restore current hint state when returned from non-hinted query planning.

If no hint is given for the current level query, pg_hint_plan_planner
calls the next level of planner after erasing the
current_hint_state. But it forgot to restore the state before the
planning of the rest part of the current-level query. It is
(a-kind-of) broken by the commit d422966 but overlooked as an
inevitable side-effect of the fix. Get back the behavior by restoring
current_hint_state after returned from the lower level planner with
unhinted query.

Issue: https://github.com/ossc-db/pg_hint_plan/issues/30
Reported-by: higuchi-daisuke

f204d75 2020-02-17 17:49:55 Kyotaro Horiguchi

Follow the core chnges.

Update core.c following the changes in the core. It makes difference
in the regression test result so update it, too.

0087813 2020-02-17 16:56:14 Kyotaro Horiguchi

Use proper type for non-integer GUC options.

pg_hint_plan internally preserved numeric options into integer
variable regardless of their types, which leads to unintentional
change of the values. Handle double values in the proper way.

f5ba122 2020-02-17 15:03:59 Kyotaro Horiguchi

Fix Rows hint parsing

This is a long standing bug that Rows hint with no parameter causees a
crash. Fixed the Rows hint parser.

64249fb 2020-02-17 13:44:33 Kyotaro Horiguchi

Give correct query location to generate_normalized_query.

There was a thinko about query_loc of generate_normalized_query which
causes a crash. For example a query is following a sequence of
semicolons (by \; in psql input) longer than the length after the last
placeholder to the end of the query, the function causes assertion
failure. Anyway prepared statements lose that value so we just pass 0
as the query_loc for consistent behavior.

be1a68f 2020-02-14 15:57:39 Kyotaro Horiguchi

Fix crash bug caused by plancache invalidation

Issue: https://github.com/ossc-db/pg_hint_plan/issues/41

After plancache is invalidated then revaliated, get_query_string
accesses query_list of invalid plansource then crash. Ignore invalid
plancache and get the correct hint string and Query node at the next
planning time during revalidation.

On the way fixing this, a bug related to planner reentrance is
fixed. That fix causes behavioral change for nested
planning. Previously outer-level hint (wrongly) overrides inner-level
query but currenlty outer-level hint no longer affects inner-level

4e3c987 2020-02-14 15:57:35 Kyotaro Horiguchi

Fix behavior of nested planning

Issue: https://github.com/ossc-db/pg_hint_plan/issues/39

When planning is nested by function call, the hints in the function
should affect the corresponding query. Maybe 9599067 introduced
that. Fix the nested planning behavior.

7d35d75 2020-02-14 15:54:13 Kyotaro Horiguchi

Fix a typo.

bf5a325 2020-02-13 20:39:39 Junseok Yang

Use tuple-only mode to stablize EXPLAIN output containing @abs_srcdir@.

The line containing @abs_srcdir@ can be longer than the header line
and if it is, the test will fail. Use tuple-only mode to get rid of
the unstable part from the EXPLAIN output.

92039c6 2020-02-13 20:01:25 LittleWuCoding

Fix compiling error on Solaris

The 'LDFLAGS+=-Wl,--build-id' option is for rpm building in Linux like
OS. The SunOS is not native support the option
'LDFLAGS+=-Wl,--build-id' . So, we disable this option in SunOS while

Committed a bit tweaked version from the orignal.

a47f7ee 2020-02-13 15:43:19 Kyotaro Horiguchi

Stabilize regression test.

Further unstability is found about stats reset. Inserted more 1 second
sleeps to stabilize it.

0136339 2020-02-13 14:52:46 Kyotaro Horiguchi

Do null-check of error_context_stack before use

The variable is accessed without null checking when planner is called
in the context of pl/pgsql. Fix it. Back-patched up to pg_hint_plan94.

Reporter: egashira-yusuke
Issue: https://github.com/ossc-db/pg_hint_plan/issues/42
Original-Author: sun-wei <30999182+Dagouhan@users.noreply.github.com>
Original-patch: https://github.com/ossc-db/pg_hint_plan/pull/45/commits/8fe092ef73a9af6cfb41e20717d7cb35aa74fce2

dba2113 2019-08-29 17:33:54 Jignesh Shah

Fix definition of is_dummy_rel based on changes to community PostgreSQL 11.3

This breaks compatibility with older minor versions, but don't bother
keeping it. Binary built using newer PG minor versions works for older
minor versions.

737bcdf 2019-08-29 16:57:16 LittleWuCoding

fix spelling mistakes in file pg_hint_plan.html

0dc01fb 2019-08-29 16:12:52 Arthur Zakirov

Use ParallelHint in ParallelHintCreate()

1d935d6 2019-03-08 14:04:33 Kyotaro Horiguchi

Silence some compilers

Some compilers seem to complain about the previous patch, that
prev_hint_str is used uninitialized. Actually it is not but move the
initialization code out of the PG_TRY() section so that such compilers
would be quiet.

9599067 2019-02-26 18:30:07 Kyotaro Horiguchi

Correctly handle planner nesting

pg_hint_plan assumed that plpgsql is the only source of nested planner
calls. Actually nested call can be made in any shapes. Most of the
cases doesn't harm but in a special case where pg_dbms_stats makes a
SPI call during query planning, that affects subsequent planner
work. Hints lose effect when pg_dbms_stats searches "locked
statistics" tables while planning the target query.

3b588bf 2019-02-26 18:27:46 Kyotaro Horiguchi

Follow the behavior change of PostgreSQL

Some behavioral changes of PostgreSQL breaks regression test. Follow
the changes.

771b62a REL11_1_3_4 2019-01-17 19:02:25 Kyotaro Horiguchi

Change version to 1.3.4.

Fixed a minor bug in 1.3.3. Fixed typo in spec file.

098f919 2019-01-17 18:47:49 Kyotaro Horiguchi

Fix condition to regenerate gather paths

pg_hint_plan forgot about additional condition to postpone generating
gather paths. Fix it.

e60d971 REL11_1_3_3 2019-01-17 17:12:27 Kyotaro Horiguchi

Change version to 1.3.3

Version bunped to 1.3.3. Updates the SPEC file.

ba26a58 2019-01-17 17:12:27 Kyotaro Horiguchi

Fix reverse link of hint_list.html

pg_hint_plan.html and hint_list.html pointed to the Japanese version
of main document. Fixed it.

1980437 2019-01-17 17:12:27 Kyotaro Horiguchi

Fix documentation.

Fixed wrong or stale descriptions, and poor or broken styles of
the documentation.

79e0686 2019-01-17 17:12:27 Kyotaro Horiguchi

Include all pg_hint_plan--*.sql files in installation

make install didn't install upgrade scripts. Fix it.

ac4fbcb 2019-01-17 17:12:27 Kyotaro Horiguchi

Change copyright year to 2019

45b89fd 2019-01-17 11:58:30 Kyotaro Horiguchi

Fix content of llvmjit package

The previous release is missing index.bc file and mislocating .bc file
in the llvmjit subpackage. The former is created at make install time
so use the standard make file to rpm-build.

d15acab 2019-01-09 09:59:12 Kyotaro Horiguchi

Call standrad_ProcessUtility when no hook is set

The last commit 2bbb376 forgot the case of no previous hook function
in the ProcessUtility hook function. Fix it.

2bbb376 2019-01-07 19:08:18 Kyotaro Horiguchi

Support prepared statements on extended protocol

However pg_hint_plan doesn't fully consider the extended protocol,
commit c05bb31 accidentially broke the case where an analyzed prepared
statement is executed on extended protocol. This patch fixes that only
for the hints-in-comment case. Hint-table still doesn't work in the
case since query-normalization needs Query, which is not available in

6769ce8 2019-01-07 19:08:18 Kyotaro Horiguchi

Remove an useless variable

commit c05bb31 made the variable stmt_name useless. Remove it.

6f23970 2018-12-05 17:31:40 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.

Show on old repository browser