• R/O
  • HTTP
  • SSH

pg_hint_plan: List of commits

firtst release

Rev. Time Author
041f948 PG13 2022-03-09 12:15:54 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.

7d53b12 2022-01-19 14:56:23 Kyotaro Horiguchi

Fix debug level check in restrict_indexes

The debug logging code blocks in the function are inconsistent about
debug level. Fix the conditions so that they work for the same debug

4ffa97e REL13_1_3_7 2020-10-29 21:03:05 Kyotaro Horiguchi

Change version to 1.3.7.

e891d54 2020-10-29 21:03:05 Kyotaro Horiguchi

Make HashJoin hint more coercive.

Even with HashJoin hint, hash joins may be rejected by planner if hash
table for the inner-rel is estimated too large. Make HashJoin hint
more coercive by increasing hash_mem_multiplier.

adc7ca8 2020-10-29 21:03:05 Kyotaro Horiguchi

Change copyright year of docs to 2020

7392b37 2020-10-29 20:31:47 Kyotaro Horiguchi

Stabilize regression test.

I was annoyed by frequent nonsubstantial change of title line length
of explain output. This commit makes maskout.sh replace the title
lines with fixed content.

8286b67 2020-10-29 20:31:47 Kyotaro Horiguchi

Follow a behavioral change in core.

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

16ae4df 2020-10-29 20:31:47 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.

2b4d65f 2020-10-29 20:31:47 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.

7192693 2020-10-29 20:31:47 Kyotaro Horiguchi

Add *.bc to .gitignore

Added *.bc and *~ to .gitignore

5f0969f 2020-10-29 20:31:47 Kyotaro Horiguchi

Follow the semantic change of pg_list part 2

Commit 7ed93ce forgot to fix another place where list_delete_cell() is
used. Fix it.

7ed93ce 2020-08-06 20:18:05 Kyotaro Horiguchi

Support PostgreSQL 13.

- Follow change of some planner functions.

- Follow a change of the semantics of List.

- Take in changes in copied core code.

- Adjust regression tests.
Amost all of the differences are come from aliasing policy, and some
come from a new GUC parameter.

a9abbbd 2020-08-05 16:30:25 Kyotaro Horiguchi

Version 1.3.6.

Fixed some bugs.

520fcbf 2020-07-14 18:06:26 sherlockcpp

Add description of *ScanRegExp hints in the document.

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

da398b8 2020-07-14 17:36:22 Kyotaro Horiguchi

Mask non-significant parts of regression output

To stabilize test, mask more of non-significant parts of EXPLAIN output.

05d5910 2020-07-14 17:35:23 Daniil Anisimov

Fix segfault when use Set, Rows and Parallel hints together

2cf367b 2020-07-14 16:31:51 Yang Rong

Fix some spelling errors in comments

a9936cd 2020-07-14 15:27:15 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.

d518f03 REL12_1_3_5 2020-02-20 23:24:34 Kyotaro Horiguchi

Preparation for branch PG12

Change version to 12-1.3.5. Adjust SPEC file.

cbe257d 2020-02-20 20:53:24 Kyotaro Horiguchi

Support PG12.

As the prepparation for making PG12 branch, change PG version to 12
and adjust for the latest PG12.

231a444 2020-02-20 20:19:44 Kyotaro Horiguchi

Change copyright year to 2020.

9d0d4e2 2020-02-17 21:07:20 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

7dcc96f 2020-02-17 16:55:02 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.

dd5ea96 2020-02-17 15:05:09 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.

de7600e 2020-02-17 13:43:13 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.

ecf1a03 2020-02-14 16:44:28 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.

0576a94 2020-02-14 13:00:01 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

85e9782 2020-02-13 20:00:54 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.

bd5dcc3 2020-02-13 14:57:07 Kyotaro Horiguchi

Fix the previous commit.

The previous commit left a line to be removed. Remove it.

b920371 2020-02-13 14:53:38 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

Show on old repository browser