OSDN Git Service

pghintplan/pg_hint_plan.git
5 years agoChanged version to 1.3.2 REL10_1_3_2
Kyotaro Horiguchi [Tue, 13 Nov 2018 07:21:33 +0000 (16:21 +0900)]
Changed version to 1.3.2

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.

5 years agoRemove unnecessary file
Kyotaro Horiguchi [Tue, 13 Nov 2018 08:37:52 +0000 (17:37 +0900)]
Remove unnecessary file

Commit c7888a1 added wrong file. Remove it.

5 years agoFix regression test following core's behavior
Kyotaro Horiguchi [Tue, 13 Nov 2018 02:42:22 +0000 (11:42 +0900)]
Fix regression test following core's behavior

Some changes has been made on GUC default value and behavior. Follow
the change. No change was made on pg_hint_plan's behavior.

5 years agoFix debug output level control
Kyotaro Horiguchi [Tue, 13 Nov 2018 03:43:10 +0000 (12:43 +0900)]
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.

5 years agoFix bogus error handling
Kyotaro Horiguchi [Tue, 13 Nov 2018 00:27:48 +0000 (09:27 +0900)]
Fix bogus error handling

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

5 years agoChange version to 1.3.1. REL10_1_3_1
Kyotaro Horiguchi [Fri, 8 Jun 2018 04:15:35 +0000 (13:15 +0900)]
Change version to 1.3.1.

1.3.0 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 commits of
core and pg_stat_statements.

8b6294c7a5 Change more places to be less trusting of RestrictInfo.is_pushed_down.
83f2061dd0 Teach contrib/pg_stat_statements to handle multi-statement commands better.
0bb51aa967 Improve parsetree representation of special functions such as CURRENT_DATE.

5 years agoTook in several improvements of pg_stat_statements
Kyotaro Horiguchi [Fri, 8 Jun 2018 03:27:03 +0000 (12:27 +0900)]
Took in several improvements of pg_stat_statements

Following two commits are took in.

83f2061dd0 Teach contrib/pg_stat_statements to handle multi-statement commands better.
0bb51aa967 Improve parsetree representation of special functions such as CURRENT_DATE.

The following one makes change of documented behavior of pg_hint_plan
so it is not took in.

a6f22e8356 Show ignored constants as "$N" rather than "?" in pg_stat_statements.

5 years agoTaking in 8b6294c7a5 of core code.
Kyotaro Horiguchi [Fri, 8 Jun 2018 02:54:28 +0000 (11:54 +0900)]
Taking in 8b6294c7a5 of core code.

Core's planner gets improved as follows. Took it in.

8b6294c7a5 Change more places to be less trusting of RestrictInfo.is_pushed_down.

5 years agoFix a crash bug in case debug_query_string is NULL
Kyotaro Horiguchi [Thu, 24 May 2018 09:18:29 +0000 (18:18 +0900)]
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.

6 years agoUse @abs_srcdir@ within ut-fdw.source
Arthur Zakirov [Thu, 2 Nov 2017 13:10:10 +0000 (16:10 +0300)]
Use @abs_srcdir@ within ut-fdw.source

The file contained absolute path of a specific working directory,
replace them with @abs_srcdir@.

6 years agoMove expected/ut-W.out to output/ut-W.source
Kyotaro Horiguchi [Mon, 6 Nov 2017 06:28:36 +0000 (15:28 +0900)]
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
@abs_srcdir@.

6 years agoAdded and removed some entries in .gitignore
Kyotaro Horiguchi [Mon, 6 Nov 2017 05:38:49 +0000 (14:38 +0900)]
Added and removed some entries in .gitignore

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

6 years agoUse pg_strcasecmp instead of strcasecmp for the sake of portability
Arthur Zakirov [Thu, 2 Nov 2017 13:00:09 +0000 (16:00 +0300)]
Use pg_strcasecmp instead of strcasecmp for the sake of portability

6 years agoChange version to 1.3.0 REL10_1_3_0
Kyotaro Horiguchi [Tue, 10 Oct 2017 02:49:25 +0000 (11:49 +0900)]
Change version to 1.3.0

6 years agoAdded a notice in the manual.
Kyotaro Horiguchi [Tue, 10 Oct 2017 03:17:58 +0000 (12:17 +0900)]
Added a notice in the manual.

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

6 years agoPrepare for rpm build for PostgreSQL 10
Kyotaro Horiguchi [Tue, 10 Oct 2017 02:37:39 +0000 (11:37 +0900)]
Prepare for rpm build for PostgreSQL 10

Edited Makefile and SPEC file so that RPM package for PostgreSQL 10 is
built.

6 years agoAdded a regtest for partitioned table.
Kyotaro Horiguchi [Tue, 10 Oct 2017 02:20:13 +0000 (11:20 +0900)]
Added a regtest for partitioned table.

Added a minimal regression test that checks this works also on
partitioned tables. Currently partitioned tables are handled in almost
the same way with inheritance tables so this would be enough.

6 years agoCorrected copyright year and a indentation.
Kyotaro Horiguchi [Tue, 10 Oct 2017 01:34:19 +0000 (10:34 +0900)]
Corrected copyright year and a indentation.

Edited a copyright notice in which year is left alone. Correct an
indentation in make_join_rel.c. No functional change.

6 years agoReflected changes as of release 10.0.
Kyotaro Horiguchi [Tue, 10 Oct 2017 01:33:00 +0000 (10:33 +0900)]
Reflected changes as of release 10.0.

add_paths_to_append_rel gets modified as of relase 10.0. Reflected it
to core.c

6 years agoAdd a regression about forcing gather-merge.
Kyotaro Horiguchi [Wed, 4 Oct 2017 00:46:43 +0000 (09:46 +0900)]
Add a regression about forcing gather-merge.

The previous commit is said to allow enforce gather merge but no
regression for that is not included. This adds that.

6 years agoModify expected files.
Kyotaro Horiguchi [Thu, 27 Jul 2017 10:09:22 +0000 (19:09 +0900)]
Modify expected files.

At 10 beta2, planner seems to get some changes to affect plans used in
regression test. Tentatively modify it just to pass the regression.
Probably it is no problem but should be checked later.

6 years agoUp to date with 10 beta 2
Kyotaro Horiguchi [Thu, 27 Jul 2017 10:07:55 +0000 (19:07 +0900)]
Up to date with 10 beta 2

Make copied code to be up to date with the core as of 10 beta 2.

6 years agoSupport DECLARE CURSOR syntax and added regression for table hinting.
Kyotaro Horiguchi [Thu, 27 Jul 2017 03:26:55 +0000 (12:26 +0900)]
Support DECLARE CURSOR syntax and added regression for table hinting.

Previous version forgets to treat DECLARE CURSOR. Added that.
Addition to that, regression test for table hinting is added.

6 years agoSupport PostgreSQL 10 beta 1 step 2/2
Kyotaro Horiguchi [Tue, 6 Jun 2017 10:56:41 +0000 (19:56 +0900)]
Support PostgreSQL 10 beta 1 step 2/2

Changed the logic to tweak parallel execution paths so that it handles
more wider (parallel index scans or gather merge, specifically) range
of parallel paths.

6 years agoSupport PostgreSQL 10 beta 1 step 1/2
Kyotaro Horiguchi [Tue, 6 Jun 2017 10:23:17 +0000 (19:23 +0900)]
Support PostgreSQL 10 beta 1 step 1/2

The first half of the work to support PostgreSQL 10.

This just makes it can work with the version of PG. So partial index
paths are lost during Parallel hint processing.  Regression tests are
heavily modified but most of them just comes from the change of
original planner behavior introduced at the point of Pg10.

6 years agoFix a bug of target query retrieval
Kyotaro Horiguchi [Fri, 19 May 2017 01:11:55 +0000 (10:11 +0900)]
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.

6 years agoFix a crash bug on complex views when enable_hint_table is on
Kyotaro Horiguchi [Thu, 18 May 2017 09:43:09 +0000 (18:43 +0900)]
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.

6 years agoFollow the behavioral change of parallel execution
Kyotaro Horiguchi [Thu, 18 May 2017 01:40:48 +0000 (10:40 +0900)]
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.

6 years agoFix a bug of Parallel hint
Kyotaro Horiguchi [Thu, 18 May 2017 01:28:49 +0000 (10:28 +0900)]
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
SEGV.

7 years agoProvide upgrade path from 1.1.3
Kyotaro Horiguchi [Tue, 21 Feb 2017 00:27:55 +0000 (09:27 +0900)]
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.

7 years agoDon't apply parallel hint on rels that planner considers unsafe.
Kyotaro Horiguchi [Thu, 16 Feb 2017 10:08:54 +0000 (19:08 +0900)]
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.

7 years agoReconsider hinting process
Kyotaro Horiguchi [Thu, 16 Feb 2017 08:41:30 +0000 (17:41 +0900)]
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
(maybe).

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,
  though).

7 years agoFix a typo of documentation.
Tatsuro Yamada [Thu, 16 Feb 2017 02:00:32 +0000 (11:00 +0900)]
Fix a typo of documentation.

Author: Tatsuro Yamada <yamatattsu@gmail.com>

7 years agoDon't set_plain_rel_pathlist for other than RTE_RELATION.
Kyotaro Horiguchi [Mon, 13 Feb 2017 08:01:49 +0000 (17:01 +0900)]
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.

7 years agoFollowing a fix in PG9.6.1.
Kyotaro Horiguchi [Mon, 13 Feb 2017 07:56:44 +0000 (16:56 +0900)]
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.

7 years agoFix parallel hint error handling.
Kyotaro Horiguchi [Mon, 13 Feb 2017 07:52:45 +0000 (16:52 +0900)]
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
them.

7 years agoRefactor hint application mechamism next step
Kyotaro Horiguchi [Fri, 10 Feb 2017 08:19:43 +0000 (17:19 +0900)]
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.

7 years agoImprove error handling of Parallel hint
Kyotaro Horiguchi [Fri, 10 Feb 2017 02:06:05 +0000 (11:06 +0900)]
Improve error handling of Parallel hint

Improve poor error report for Parallel hint.

7 years agoFix wrongly lowering max_parallel_workers_per_gather
Kyotaro Horiguchi [Fri, 10 Feb 2017 02:09:52 +0000 (11:09 +0900)]
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.

7 years agoRefactor hint application mechamism
Kyotaro Horiguchi [Thu, 9 Feb 2017 01:50:29 +0000 (10:50 +0900)]
Refactor hint application mechamism

Before we have the new hook set_rel_pathlist_hook, plan enforcment is
performed in two steps, one works only for queries with one relation,
the other works only for joins. Now they are performed once and at
once in set_rel_pathlist_hook. As a byproduct of this refactoring,
index restriction no longer runs for indexes on constraint-excluded
relations and expected/ut-S.out changed a bit.

The major changes by this patch are the followings.

- Remove hook to get_relation_info_hook:
  The function for the hook pg_hint_plan_get_relation_info is removed.

- pg_hint_plan_join_search no longer calls rebuild_scan_path. The
  function and a copied function set_plain_rel_pathlist are removed.

- delete_indexes has been renamed to restrict_indexes, which
  represents the functionality clearer. And the function was
  refactored main for readablity.

- Added several regtests for parallel.

7 years agoFix default_version of extension control file
Kyotaro Horiguchi [Thu, 9 Feb 2017 00:07:14 +0000 (09:07 +0900)]
Fix default_version of extension control file

default_version in pg_hint_plan.control was left unchanged on updating
version number. Fixed it.

7 years agoEdit copyright year
Kyotaro Horiguchi [Thu, 9 Feb 2017 00:06:28 +0000 (09:06 +0900)]
Edit copyright year

7 years agoProperly change the state of parallel hints.
Kyotaro Horiguchi [Wed, 8 Feb 2017 01:34:09 +0000 (10:34 +0900)]
Properly change the state of parallel hints.

The state member of parallel hint is forgotten to be chaned on usage.
This fixes it.

7 years agoRename some functions and refactor code.
Kyotaro Horiguchi [Wed, 8 Feb 2017 01:16:01 +0000 (10:16 +0900)]
Rename some functions and refactor code.

Some functions had a bit confusing naming and inconvenient interfaces.
Renamed such functions and refactored the code.

7 years agoChange version to 1.2.0.
Kyotaro Horiguchi [Tue, 7 Feb 2017 11:28:18 +0000 (20:28 +0900)]
Change version to 1.2.0.

Change version number to 1.2.0 and prepare RPM build envoronment.

7 years agoAdd description of Parallel hint to documentation
Kyotaro Horiguchi [Tue, 7 Feb 2017 11:05:12 +0000 (20:05 +0900)]
Add description of Parallel hint to documentation

Addition to that, documents are refactored.

7 years agoNew hint "Parallel"
Kyotaro Horiguchi [Tue, 7 Feb 2017 11:03:13 +0000 (20:03 +0900)]
New hint "Parallel"

Added a new feature to control parallel query execution.

7 years agoRename current_hint to current_hint_state
Kyotaro Horiguchi [Tue, 7 Feb 2017 03:54:05 +0000 (12:54 +0900)]
Rename current_hint to current_hint_state

The name current_hint is quite confusing so change the name to less
confusing one.

7 years agoFix some syntax and comments.
Kyotaro Horiguchi [Mon, 6 Feb 2017 06:18:08 +0000 (15:18 +0900)]
Fix some syntax and comments.

Some following comma for the last element in enum definition and
incorrect comments are fixed.

7 years agoRemove an unnecessary Makefile entry for tar file REL96_1_1_3
Kyotaro Horiguchi [Mon, 5 Sep 2016 07:18:13 +0000 (16:18 +0900)]
Remove an unnecessary Makefile entry for tar file

Remove mistakenly copy'n-pasted description from outside in Makefile.

7 years agoEdit copyright notices
Kyotaro Horiguchi [Mon, 5 Sep 2016 07:11:30 +0000 (16:11 +0900)]
Edit copyright notices

7 years agoSupport PostgreSQL 9.6 RC1
Kyotaro Horiguchi [Thu, 1 Sep 2016 04:57:30 +0000 (13:57 +0900)]
Support PostgreSQL 9.6 RC1

Edited Makefile and renamed and edited RPM spec file.
Copied functions are updated and follow the changes of internal API.
Modified regressions to pass with 9.6 RC1.

7 years agoAdd RPM spec file forgotten in the previous commit.
Kyotaro Horiguchi [Fri, 13 May 2016 06:42:45 +0000 (15:42 +0900)]
Add RPM spec file forgotten in the previous commit.

7 years agoMerge pull request #36272 (fujii_masao/pg_hint_plan/master into master).
Kyotaro HORIGUCHI [Tue, 26 Apr 2016 08:44:48 +0000 (17:44 +0900)]
Merge pull request #36272 (fujii_masao/pg_hint_plan/master into master).

8 years agoUse pg_reload_conf() to reload the configuration file in regression test.
MasaoFujii [Fri, 22 Apr 2016 04:38:42 +0000 (13:38 +0900)]
Use pg_reload_conf() to reload the configuration file in regression test.

Previously the regression test ran pg_ctl reload command for that purpose.
However in the environment where the path to PostgreSQL binaries is not set,
the regression test always failed because pg_ctl could not be found.
To reload the configuration file even in that environment, this commit
changes the regression test so that it uses pg_reload_conf function, instead.

8 years agoPrepare for 1.1.3/PG95.
Kyotaro Horiguchi [Fri, 15 Jan 2016 02:48:52 +0000 (11:48 +0900)]
Prepare for 1.1.3/PG95.

The pg_hint_plan version of master branch is left as 1.1.2. This
commit corrects the pg_hint_plan version, and edits RPM building
environment for PostgreSQL 9.5.

8 years agoEdit copyright years.
Kyotaro Horiguchi [Fri, 15 Jan 2016 02:47:17 +0000 (11:47 +0900)]
Edit copyright years.

8 years agoChange for new syntax items in 9.5.
Kyotaro Horiguchi [Fri, 15 Jan 2016 02:44:37 +0000 (11:44 +0900)]
Change for new syntax items in 9.5.

Some syntactical elements are added in 9.5. This change reflects it.

Addition to that, deleted unused parts in pg_stat_statements, which
are previously invalidated with #ifdef directives.

8 years agoFollow a change of error message.
Kyotaro Horiguchi [Fri, 15 Jan 2016 00:27:24 +0000 (09:27 +0900)]
Follow a change of error message.

Context message of PL/pgSQL is changed so this commit refrects it to
exted/pg_hint_plan.out.

8 years agoFollowed the changes of 9.5.0 release.
Kyotaro Horiguchi [Fri, 15 Jan 2016 00:28:29 +0000 (09:28 +0900)]
Followed the changes of 9.5.0 release.

There was some changes in 9.5.0 release affect
pg_hint_plan. set_append_rel_pathlist() no longer sets cheapest path
and it became a business of the caller. So rebuild_scan_path() does
so. core.c gets changed from changing lateral join infrastracture
(acfcd45cacb6df23edba4cb3753a2be594238a99) and a change related to custom path(c2ea2285e978d9289084846a3343cef7d261d880).

8 years agoMade compatible with 9.5a1
Kyotaro Horiguchi [Mon, 17 Aug 2015 09:33:38 +0000 (18:33 +0900)]
Made compatible with 9.5a1

Make make_join_rel.c to catch up to REL9_5_ALPHA2.  Change regtests to
reflect some differences of PostgreSQL's behavior in such like
collapsing of simple VALUES clause, rows estimation and explain
representation of join filter.

9 years agoFixed a bug related to SQL statements in PL/pgSQL functions.
Kyotaro Horiguchi [Mon, 22 Dec 2014 08:34:15 +0000 (17:34 +0900)]
Fixed a bug related to SQL statements in PL/pgSQL functions.

At least since 9.1, true query strings of SQL statements executed in
PL/pgSQL functions were found that were not obtained correctly by the
previous implement, it is because that PLpgSQL_stmt variable did not
have proper query string to be read for hints. Instead, it is changed
to read them from the top of error_context_stack in
pg_hint_plan_planner(). This change made a slight difference in
behavior which doesn't affect its work so a part of the regtest was
also changed. And added some regression tests for it.

9 years agoCatch up the changes of pg_stat_statements.c
Kyotaro Horiguchi [Mon, 22 Dec 2014 02:07:09 +0000 (11:07 +0900)]
Catch up the changes of pg_stat_statements.c

The change has nothing to do with pg_hint_plan but it's necessary to
catch it up in order to keep the difference minimal for the ease of
maintenance.

9 years agoSet additional parameter of set_config_option().
Kyotaro Horiguchi [Tue, 16 Dec 2014 10:00:50 +0000 (19:00 +0900)]
Set additional parameter of set_config_option().

9.5dev added new parameter to set_config_option(). This paramter
should be false in set_config_option_wrapper.

9 years agoFix regression test according to the changes of PostgreSQL.
Kyotaro Horiguchi [Tue, 16 Dec 2014 10:12:59 +0000 (19:12 +0900)]
Fix regression test according to the changes of PostgreSQL.

PostgreSQL became to give WARNING for usage of hash indexes. This
change is to follow it.

9 years agoPrepare for 1.1.2
Kyotaro Horiguchi [Wed, 17 Dec 2014 02:20:21 +0000 (11:20 +0900)]
Prepare for 1.1.2

9 years agoRemove unnecessary tracker code from documentations.
Kyotaro Horiguchi [Fri, 19 Dec 2014 07:10:46 +0000 (16:10 +0900)]
Remove unnecessary tracker code from documentations.

9 years agoAdded English documentation.
Kyotaro Horiguchi [Fri, 19 Dec 2014 06:43:36 +0000 (15:43 +0900)]
Added English documentation.

9 years agoSome fix and addition to the japaneses document.
Kyotaro Horiguchi [Fri, 19 Dec 2014 06:05:58 +0000 (15:05 +0900)]
Some fix and addition to the japaneses document.

It lacked the description about joni direction enforcement so added
it. Addition to it, added html language specification and updated
target PostgreSQL versions and OS version.

9 years agoFix regression test according to the changes of PostgreSQL.
Kyotaro Horiguchi [Tue, 16 Dec 2014 10:12:59 +0000 (19:12 +0900)]
Fix regression test according to the changes of PostgreSQL.

Row countings of EXPLAIN results seems to be changed. This follows the
change.

9 years agoRemoved a stale comment.
Kyotaro Horiguchi [Tue, 16 Dec 2014 09:45:22 +0000 (18:45 +0900)]
Removed a stale comment.

9 years agoFix to remove plpgsql query string on non-local exit.
Kyotaro Horiguchi [Tue, 16 Dec 2014 05:45:13 +0000 (14:45 +0900)]
Fix to remove plpgsql query string on non-local exit.

Pl/pgsql query string stored internally squatted after an execution
error then pg_hint_plan afterward read it for hints and ignores really
given ones. This commit makes it erased at the end of transaction.

9 years agoFix about unexpectedly living plpgsql query string.
Kyotaro Horiguchi [Tue, 16 Dec 2014 04:20:02 +0000 (13:20 +0900)]
Fix about unexpectedly living plpgsql query string.

pg_hint_plan forgot to erase plpgsql query strings when it is NOT a
static statement, so it continued to read hints from the remenbered
wrong query string after using dynamic execution of a statement. This
commit makes it to be erased for any types of pl/pgsql statement.

9 years agoEnhance debug output.
Kyotaro Horiguchi [Tue, 16 Dec 2014 09:31:12 +0000 (18:31 +0900)]
Enhance debug output.

Added new debug output levels detailed and verbose. These let you see
more verbose information about what pg_hint_plan does internally.

9 years agoRevert "Add new join method hint "NestLoop_NM" which means force nested loop"
Kyotaro Horiguchi [Wed, 17 Dec 2014 01:09:32 +0000 (10:09 +0900)]
Revert "Add new join method hint "NestLoop_NM" which means force nested loop"

This reverts commit 7f6e3ce1326751c36676653ef1e81893296860b6.

9 years agoAdd new join method hint "NestLoop_NM" which means force nested loop
Kyotaro Horiguchi [Thu, 18 Sep 2014 05:23:15 +0000 (14:23 +0900)]
Add new join method hint "NestLoop_NM" which means force nested loop
but inhibit materialize of the inner relation.

9 years agoFix a bug that index restriction by name doesn't work for UPDATEs on
Kyotaro Horiguchi [Wed, 17 Sep 2014 08:13:57 +0000 (17:13 +0900)]
Fix a bug that index restriction by name doesn't work for UPDATEs on
inheritance parent.

Inheritance planner doesn't claim for the inheritance parent relation,
so pg_hint_plan_get_relation_info cannot have the chance to prepare
the index spec information for chlid relations. This change make the
function to try to find parent relation even if it is called for the
children with inhparent == false from the first.

9 years agoRemove unused struct member.
Kyotaro Horiguchi [Wed, 17 Sep 2014 08:10:18 +0000 (17:10 +0900)]
Remove unused struct member.

9 years agoRPM automation
Kyotaro Horiguchi [Fri, 5 Sep 2014 04:35:55 +0000 (13:35 +0900)]
RPM automation

9 years agoChange verision to 1.1.1. Change target version to 9.4.
Kyotaro Horiguchi [Thu, 4 Sep 2014 09:04:56 +0000 (18:04 +0900)]
Change verision to 1.1.1. Change target version to 9.4.

9 years agoMake codes copied from PostgreSQL catch up to 9.4
Kyotaro Horiguchi [Thu, 4 Sep 2014 08:55:38 +0000 (17:55 +0900)]
Make codes copied from PostgreSQL catch up to 9.4

9 years agoInterim support for 9.4beta2. pg_stat_statements.c is replaced with the latest versio...
Kyotaro Horiguchi [Thu, 4 Sep 2014 02:03:08 +0000 (11:03 +0900)]
Interim support for 9.4beta2. pg_stat_statements.c is replaced with the latest version. Regtests are rearranged and stabilized.

9 years agoMerge branch 'master' into PG93
Kyotaro Horiguchi [Fri, 5 Sep 2014 03:34:28 +0000 (12:34 +0900)]
Merge branch 'master' into PG93

10 years agoリグレッションテストを出力メッセージの変更に対応させた。
Takashi Suzuki [Fri, 24 Jan 2014 04:07:00 +0000 (13:07 +0900)]
リグレッションテストを出力メッセージの変更に対応させた。

10 years agohint_reportの出力メッセージを大文字始まりで統一した。
Takashi Suzuki [Fri, 24 Jan 2014 02:18:04 +0000 (11:18 +0900)]
hint_reportの出力メッセージを大文字始まりで統一した。

10 years agoコメントやメッセージを修正した。
Takashi Suzuki [Tue, 21 Jan 2014 02:43:05 +0000 (11:43 +0900)]
コメントやメッセージを修正した。

10 years agoコピーライトを更新した
Takashi Suzuki [Fri, 17 Jan 2014 02:49:38 +0000 (11:49 +0900)]
コピーライトを更新した

10 years agoRowsで外部ファイルを扱う試験を環境に依存しないようにした。
Takashi Suzuki [Fri, 17 Jan 2014 02:29:44 +0000 (11:29 +0900)]
Rowsで外部ファイルを扱う試験を環境に依存しないようにした。

外部ファイルのアドレスを特定の文字列に置き換えることで、環境に依存
しないようにした。

10 years agoRows関連試験の予測結果を、全試験を流した場合のものに変更した。
Takashi Suzuki [Fri, 17 Jan 2014 01:59:42 +0000 (10:59 +0900)]
Rows関連試験の予測結果を、全試験を流した場合のものに変更した。

10 years agoRowsヒント句のメッセージ出力(R-3-6-*)の試験を追加した。
Takashi Suzuki [Fri, 17 Jan 2014 01:52:44 +0000 (10:52 +0900)]
Rowsヒント句のメッセージ出力(R-3-6-*)の試験を追加した。

10 years agoRowsヒント句の同じテーブル組合せ(R-3-5-*)の試験を追加した。
Takashi Suzuki [Fri, 17 Jan 2014 01:38:30 +0000 (10:38 +0900)]
Rowsヒント句の同じテーブル組合せ(R-3-5-*)の試験を追加した。

10 years agoRowsヒント句の継承テーブル関連(R-3-4-*)の試験を追加した。
Takashi Suzuki [Fri, 17 Jan 2014 01:27:22 +0000 (10:27 +0900)]
Rowsヒント句の継承テーブル関連(R-3-4-*)の試験を追加した。

10 years agoRowsヒント句の比率指定(R-3-3-*)の試験を追加した。
Takashi Suzuki [Fri, 17 Jan 2014 01:15:56 +0000 (10:15 +0900)]
Rowsヒント句の比率指定(R-3-3-*)の試験を追加した。

10 years agoRowsヒント句の増減値指定(R-3-2-*)の試験を追加した。
Takashi Suzuki [Thu, 16 Jan 2014 08:12:42 +0000 (17:12 +0900)]
Rowsヒント句の増減値指定(R-3-2-*)の試験を追加した。

10 years agoRowsヒント句の絶対値指定(R-3-1-*)の試験を追加した。
Takashi Suzuki [Thu, 16 Jan 2014 07:44:21 +0000 (16:44 +0900)]
Rowsヒント句の絶対値指定(R-3-1-*)の試験を追加した。

10 years agobug fix #3
Takashi Suzuki [Thu, 16 Jan 2014 07:43:38 +0000 (16:43 +0900)]
bug fix #3

10 years agoR-2-4-*の試験とR-2-5-*の試験を追加した。
Takashi Suzuki [Thu, 16 Jan 2014 06:57:30 +0000 (15:57 +0900)]
R-2-4-*の試験とR-2-5-*の試験を追加した。

10 years agoRowsヒント句のRULEまたはVIEWの試験(R-2-3-*)を追加した。
Takashi Suzuki [Thu, 16 Jan 2014 06:52:16 +0000 (15:52 +0900)]
Rowsヒント句のRULEまたはVIEWの試験(R-2-3-*)を追加した。

10 years agoバグ修正にそって試験および予想結果を修正した。
Takashi Suzuki [Thu, 16 Jan 2014 05:08:55 +0000 (14:08 +0900)]
バグ修正にそって試験および予想結果を修正した。

10 years agobug fix #2
Takashi Suzuki [Thu, 16 Jan 2014 05:02:23 +0000 (14:02 +0900)]
bug fix #2

件数補正のときに、全ての結合パスにおいて部分集合となってしまい、他
のRowsヒント句適用後に見積もり件数を再計算してしまった。。

理由
  Rowsヒント句に存在しないテーブル組合せを指定すると、pg_hint_plan
  内部で空のテーブル集合として扱っていたため。