Recent commits on pg_hint_plan (git) - PostgreSQL で ヒント句を使う - OSDN https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/ 353c36: Ignore non-existent prepared statement in get_query_strin... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/353c36562b707de07928a4acd366313926de7f35 , 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. ]]> Kyotaro Horiguchi Commit: 353c36562b707de07928a4acd366313926de7f35
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 ,
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.
]]>
904a4f: Ignore non-existent prepared statement in get_query_strin... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/904a4fcd793b1e2e4cf7c860f51383708ab21482 , 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. ]]> Kyotaro Horiguchi Commit: 904a4fcd793b1e2e4cf7c860f51383708ab21482
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 ,
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.
]]>
2d5b8c: Ignore non-existent prepared statement in get_query_strin... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/2d5b8cdad8ba623b3313b23a0b45712438ff68d8 , 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. ]]> Kyotaro Horiguchi Commit: 2d5b8cdad8ba623b3313b23a0b45712438ff68d8
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 ,
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.
]]>
041f94: Ignore non-existent prepared statement in get_query_strin... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/041f948d386b093d5f34f8af4582dc2ffe084abc , 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. ]]> Kyotaro Horiguchi Commit: 041f948d386b093d5f34f8af4582dc2ffe084abc
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 ,
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.
]]>
501fdf: Add forgotten test files 9e2f8b6 forgot to contain the .... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/501fdfce138690880661839510642f56cc26e669 Kyotaro Horiguchi Commit: 501fdfce138690880661839510642f56cc26e669
Add forgotten test files

9e2f8b6 forgot to contain the .sql and expected/.out files for
hints_anywhere feature. Add them.
]]>
7d53b1: Fix debug level check in restrict_indexes The debug logg... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/7d53b124d4b2235dc933d1d925350319e081c1bf Kyotaro Horiguchi Commit: 7d53b124d4b2235dc933d1d925350319e081c1bf
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
levels.
]]>
c23bb6: Fix SEGV caused by duplicate memoize hints HintTypeName ... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/c23bb6af96238bb8b3bca76b84b62978e431f5bb ]]> Kyotaro Horiguchi Commit: c23bb6af96238bb8b3bca76b84b62978e431f5bb
Fix SEGV caused by duplicate memoize hints

HintTypeName was missing the item for the Memoize hint. This causes
SEGV or "(null)" printing by printf on erroring of duplicate memoize
hints.

Add the missing item and a static assertion to check the same kind of
fault.

Reported by ShangBenX 
]]>
e6a900: Properly free all elements in a list HintStateDelete tri... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/e6a90040835ccfb32479f2c42f5baecaa72d9ec0 all_hints[] but actually it only freed part of them. Correct the code as it intended. Some other palloced blocks are being hanged under the struct but we don't bother trying to be perfect at cleaning up the whole struct since it will be freed up at query end. ]]> 褚华兴 Commit: e6a90040835ccfb32479f2c42f5baecaa72d9ec0
Properly free all elements in a list

HintStateDelete tried to free the elements of hstate->all_hints[] but
actually it only freed part of them.  Correct the code as it intended.

Some other palloced blocks are being hanged under the struct but we
don't bother trying to be perfect at cleaning up the whole struct
since it will be freed up at query end.
]]>
e771aa: Fix many typos in doc Many misspellings were left alone ... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/e771aa671adc23577b8d9ef1eb797bad03e3b307 ]]> Kyotaro Horiguchi Commit: e771aa671adc23577b8d9ef1eb797bad03e3b307
Fix many typos in doc

Many misspellings were left alone in the documentation.  Rechecked the
whole documentation and fixed the misspellings.

Reported-by: qianglingjie <86580516+qianglingjie@users.noreply.github.com>
]]>
b28fc4: Use standard way of deleteing list cell When the list im... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/b28fc4aa90f26c769d0c058058093e4b89cabe4f Maxim Orlov Commit: b28fc4aa90f26c769d0c058058093e4b89cabe4f
Use standard way of deleteing list cell

When the list implementation was changed, pg_hint_plan followed that
change by modifying existing use-side code.  Use instead
foreach_delete_current, which is the standard provided API to do the
same.
]]>
9e2f8b: Allow hints to be placed anywhere in query Hints descrip... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/9e2f8b6127c0f0cf9204529b2e83d967876f0ae1 Daniil Anisimov Commit: 9e2f8b6127c0f0cf9204529b2e83d967876f0ae1
Allow hints to be placed anywhere in query

Hints description is restriected to be placed before certain
characters. That is effectively at the beginning of a query, or after
EXPLAIN or PREPARE.  This commit adds a new setting parameter
pg_hint_plan.hints_anywhere, which gets rid of that restriction.  When
it is on, pg_hint_plan ignores SQL syntax at all while reading hints
so there's no restricion on where hint string is placed in a query
string. On the other hand it may lead to false reads from a non-hint
strings.
]]>
e5e2b1: Create README.md Add standard README.md file. This file... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/e5e2b19a6696a7716809186c5f24823513bca003 Alex Rattray Commit: e5e2b19a6696a7716809186c5f24823513bca003
Create README.md

Add standard README.md file.  This file is a simple conversion from
existing document as a starter.
]]>
e9e564: Add LD option --build-id only at RPM-build time That opt... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/e9e564ad59b8bd4a03e0f13b95b5122712e573e6 fengzh Commit: e9e564ad59b8bd4a03e0f13b95b5122712e573e6
Add LD option --build-id only at RPM-build time

That option harms not only SunOS but also BSDs.  It is required by
rpmbuild so it is sensible to move the option from Makefile to SPEC
file.
]]>
0a27fc: Fix behavior for pg_hint_plan.debug_print It was a kind ... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/0a27fc8da0a5475be04a285d291ebb6152d1c1e9 mikecaat Commit: 0a27fc8da0a5475be04a285d291ebb6152d1c1e9
Fix behavior for pg_hint_plan.debug_print

It was a kind of broken that some debug code paths are never visited
or that higher debug_level doesn't offer detailed messages.
Fix some debug messages' debug_level condition so that we can see the
proper messages for every debug_level.
]]>
687ced: Fix versions and copyright year of doc https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/687ced2ec2d24f0029e26f4ef5e7fdcd9bbb00a6 Kyotaro Horiguchi Commit: 687ced2ec2d24f0029e26f4ef5e7fdcd9bbb00a6
Fix versions and copyright year of doc
]]>
1218a2: [DOC] Fix default value for pg_hint_plan.message_level T... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/1218a265487a2d698f5ad82dc00e68a945776126 Kyotaro Horiguchi Commit: 1218a265487a2d698f5ad82dc00e68a945776126
[DOC] Fix default value for pg_hint_plan.message_level

The actual default value for the variable is LOG so that the messages
are emitted to server log. Fix the documentation.

Per the report from jianggq@cn.fujitsu.com.
]]>
857297: Light-Weight spelling and grammar fixes Fix some fixes o... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/857297af0369a677dc88515bb2e2acfc47a9e6dc Robert Treat Commit: 857297af0369a677dc88515bb2e2acfc47a9e6dc
Light-Weight spelling and grammar fixes

Fix some fixes of spelling and grammar in the doc.
]]>
cde640: Followup change to support PG14 One improvement and on f... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/cde640fdefad9b0d6cc50985fdf93eb50bf01903 Kyotaro Horiguchi Commit: cde640fdefad9b0d6cc50985fdf93eb50bf01903
Followup change to support PG14

One improvement and on fix.

Ressurect post_parse_analysys_hook function to avoid redandunt
computation of jumble state if it is generated in-core.

Properly handle the case where compute_query_id is turned off while
pg_hint_plan.enable_hint_talbe is on.  This operation lead to a crash.
]]>
d7296d: Update copyright year of files https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/d7296d7ffb44a9e197c908885f7383b63d5a08da Tatsuro Yamada Commit: d7296d7ffb44a9e197c908885f7383b63d5a08da
Update copyright year of files
]]>
437a4f: Allow run make check of PostgreSQL with loading pg_hint.p... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/437a4fa587bf960c2447c06e64c2b1dda6c4403c EXTRA_REGRESS_OPTS="--temp-config /pg_hint_plan.conf" make check-world fails for test that requires extra modules. ]]> Kyotaro Horiguchi Commit: 437a4fa587bf960c2447c06e64c2b1dda6c4403c
Allow run make check of PostgreSQL with loading pg_hint.plan

Automatically switch environment when pg_hint_plan is installed as a
part of "make check" of PostgreSQL.  That test is executed with the
following command line in the top directory of PostgreSQL tree.

make check EXTRA_INSTALL= EXTRA_REGRESS_OPTS="--temp-config /pg_hint_plan.conf"

make check-world fails for test that requires extra modules.
]]>
3d8c7b: Support "Memoize" Hint. PostgreSQL 14 introduced the new... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/3d8c7b8a51c93409fd9c22a730e60ee13456fdbe Kyotaro Horiguchi Commit: 3d8c7b8a51c93409fd9c22a730e60ee13456fdbe
Support "Memoize" Hint.

PostgreSQL 14 introduced the new optimization item "memoize", which
allows a join to memoize the inner result.  Add a hint to control this
feature.
]]>
454f72: Support PostgreSQL 14 In PostgreSQL 14, planner was rest... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/454f72a07c2bfa37816be9b223de17e01bdb23c8 Kyotaro Horiguchi Commit: 454f72a07c2bfa37816be9b223de17e01bdb23c8
Support PostgreSQL 14

In PostgreSQL 14, planner was restructured in regard to query string
passing.  This change allows us to remove fair amount of lines and
complexity that had been added as a struggle for retrieving proper
query string.

Two callbacks, post_parse_analyze_hook and ProcessUtility_hook are no
longer used.  get_query_string is removed altogether.  Also
current_hint_retrieved juggling, which was complex and fragile,
disappears. Now pg_hint_plan_planner alone can retrieve hint string by
looking into the given string.

In PostgreSQL 14, a new optimization item "memoize" is added. It is
not handled in this commit and leave it for a later commit.
]]>
a60dec: Fix bogus upgrade scripts. https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/a60dec0ac6f9a9cd1248b5ebadbfa4951712e8d5 Kyotaro Horiguchi Commit: a60dec0ac6f9a9cd1248b5ebadbfa4951712e8d5
Fix bogus upgrade scripts.
]]>
306be8: Update core.c and make_join_rel.c. From this version cor... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/306be8ac7ac24591a96abd8415881804e1dfd31f Kyotaro Horiguchi Commit: 306be8ac7ac24591a96abd8415881804e1dfd31f
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.
]]>
beb6a8: New tool to generate source files for copied functions P... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/beb6a85e08730367cf6efc788557d74d18173bea Kyotaro Horiguchi Commit: beb6a85e08730367cf6efc788557d74d18173bea
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.
]]>
c3634a: Follow a behavioral change in core. Commit e22e29c258 ha... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/c3634a95607561a536fb3a9566ebaee1290430ed Kyotaro Horiguchi Commit: c3634a95607561a536fb3a9566ebaee1290430ed
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.
]]>
a797bc: Change version to 1.3.7. Fixed bogus upgrade scripts on ... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/a797bcf944d7f5c17d6d26cdaa2c57ef50b73a81 Kyotaro Horiguchi Commit: a797bcf944d7f5c17d6d26cdaa2c57ef50b73a81
Change version to 1.3.7.

Fixed bogus upgrade scripts on the way changing version.
]]>
0fe276: Make HashJoin hint more coercive. Even with HashJoin hin... https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/0fe27602c9c1f41e066901c20800fdec6f9ac184 Kyotaro Horiguchi Commit: 0fe27602c9c1f41e066901c20800fdec6f9ac184
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 temporarily increasing work_mem. This change affects
only join-searching so no significant side-effects are expected.
]]>
01adea: Fix tested OS version to CentOS 8.2 https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/01adeac101d306f8bf78f221b50c81727a8d9c45 Kyotaro Horiguchi Commit: 01adeac101d306f8bf78f221b50c81727a8d9c45
Fix tested OS version to CentOS 8.2
]]>
e600d8: Change copyright year of docs to 2020 https://ja.osdn.net/projects/pghintplan/scm/git/pg_hint_plan/commits/e600d836933221ddefbfe09331328181fb83731a Kyotaro Horiguchi Commit: e600d836933221ddefbfe09331328181fb83731a
Change copyright year of docs to 2020
]]>