• R/O
  • HTTP
  • SSH

pg_hint_plan: List of commits

firtst release

Rev. Time Author
353c365 PG10 2022-03-09 12:18:44 Kyotaro Horiguchi

Ignore non-existent prepared statement in get_query_string.

CREATE FUNCTION of SQL function uses post_parse_analyze_hook during
validation. If the function contained EXECUTE <prepared statement>,
not only that statement may be nonexistent, but also there's no need
of the query string at that point.

Since execution of nonexistent prepared statement ends with failure
sooner or later, we can safely ignore that.

Backpatch to pg_hint_plan10 that are before the core's EOL.

a60dec0 2020-10-29 21:20:30 Kyotaro Horiguchi

Fix bogus upgrade scripts.

306be8a 2020-10-29 21:20:30 Kyotaro Horiguchi

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.

beb6a85 2020-10-29 21:20:30 Kyotaro Horiguchi

New tool to generate source files for copied functions

Previously core.c and make_join_rel.c are maintained by hand. This
tool generates the files from corresponding core source files.

c3634a9 2020-10-29 21:19:38 Kyotaro Horiguchi

Follow a behavioral change in core.

Commit e22e29c258 has changed the core's behavior of naming indexes.
Follow the changes. This is regression-result changes only.

c44dcca REL10_1_3_6 2020-08-05 16:25:39 Kyotaro Horiguchi

Version 1.3.6.

Fixed some bugs.

46954dc 2020-07-14 18:10:06 sherlockcpp

Add description of *ScanRegExp hints in the document.

English version of hint list is missing regexp versions of scan
hints. Add them.

96a5329 2020-07-14 17:30:56 Daniil Anisimov

Fix segfault when use Set, Rows and Parallel hints together

e7c3469 2020-07-14 16:36:34 Yang Rong

Fix some spelling errors in comments

46ac55e 2020-07-14 16:02:45 egashira.yusuke

Mark hint table as a configuration table.

The table hint_plan.hints is a configuration table of
pg_hint_plan. Mark it as such, as well as its sequence table.

Back patch to pg_hint_plan96.

f282518 2020-07-14 16:02:17 LucyLikeMilk

Fix compiling error on Solaris

Solaris doesn't like 'LDFLAGS+=-Wl,--build-id' option is for rpm
building. This has been applied on other branches but overlooked on
this branch.

8fe6bea REL10_1_3_5 2020-02-20 20:12:38 Kyotaro Horiguchi

Change version to 1.3.5.

Version 1.3.4 for pg_hint_plan10 is skipped to make version number in
sync with pg_hint_plan11.

f170606 2020-02-20 19:06:11 Kyotaro Horiguchi

Change copyright year to 2020.

b09afed 2020-02-20 18:58:34 Kyotaro Horiguchi

Catch up core's change.

The commits 19ff710aaa, 19ff710aaa and d4b754c876 affected
core.c. Catch up them.

1d86d3b 2020-02-17 21:08:15 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

ef5e864 2020-02-17 16:56:35 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.

ffc2832 2020-02-17 15:00:43 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.

788cf4b 2020-02-17 13:45: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.

ca7d497 2020-02-14 16:31:26 Kyotaro Horiguchi

Fix crash bug caused by plancache invalidation


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

eb2d8f3 2020-02-14 16:31:26 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.

26d0dec 2020-02-14 16:22:20 Kyotaro Horiguchi

Don't leave partial paths when no parallel hint is specified

pg_hint_plan_set_rel_pathlist left partial paths if no parallel hint
is specified, but that behavior leaves indexscan partial paths on
restricted indexes. Remove all partial paths unconditionally.

b526f32 2020-02-13 20:42:45 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.

24d844e 2020-02-13 15:50:38 Kyotaro Horiguchi

Stabilize regression test.

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

987abe5 2020-02-13 14:52:33 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

64fe767 2019-08-29 17:23:26 Jignesh Shah

Fix is_dummy_rel based on changes in PostgreSQL 10.8

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.

31d93fe 2019-08-29 16:57:12 LittleWuCoding

fix spelling mistakes in file pg_hint_plan.html

d9bc761 2019-08-29 16:12:39 Arthur Zakirov

Use ParallelHint in ParallelHintCreate()

b8f3e8a 2019-03-08 14:05:11 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.

647bad4 2019-02-26 17:49:50 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.

8cc5d96 2019-02-26 17:48:41 Kyotaro Horiguchi

Follow the behavior change of PostgreSQL

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

Show on old repository browser