• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revision8cc5d9651b4ea38a37f711ca047a624a5f2ab7f9 (tree)
Time2019-02-26 17:48:41
AuthorKyotaro Horiguchi <horiguchi.kyotaro@lab....>
CommiterKyotaro Horiguchi

Log Message

Follow the behavior change of PostgreSQL

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

Change Summary

Incremental Difference

--- a/expected/init.out
+++ b/expected/init.out
@@ -159,8 +159,9 @@ SELECT name, setting, category
159159 OR name = 'client_min_messages'
160160 ORDER BY category, name;
161161 SELECT * FROM settings;
162- name | setting | category
163-------------------------------+-----------+---------------------------------------------
162+ name | setting | category
163+------------------------------+-----------+-------------------------------------------------
164+ client_min_messages | notice | Client Connection Defaults / Statement Behavior
164165 geqo | on | Query Tuning / Genetic Query Optimizer
165166 geqo_effort | 5 | Query Tuning / Genetic Query Optimizer
166167 geqo_generations | 0 | Query Tuning / Genetic Query Optimizer
@@ -196,7 +197,6 @@ SELECT * FROM settings;
196197 enable_seqscan | on | Query Tuning / Planner Method Configuration
197198 enable_sort | on | Query Tuning / Planner Method Configuration
198199 enable_tidscan | on | Query Tuning / Planner Method Configuration
199- client_min_messages | notice | Reporting and Logging / When to Log
200200 (36 rows)
201201
202202 ANALYZE;
--- a/expected/pg_hint_plan.out
+++ b/expected/pg_hint_plan.out
@@ -11,13 +11,13 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
1111 (4 rows)
1212
1313 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.val = t2.val;
14- QUERY PLAN
15--------------------------------------------
16- Merge Join
17- Merge Cond: (t2.val = t1.val)
18- -> Index Scan using t2_val on t2
19- -> Materialize
20- -> Index Scan using t1_val on t1
14+ QUERY PLAN
15+--------------------------------
16+ Hash Join
17+ Hash Cond: (t2.val = t1.val)
18+ -> Seq Scan on t2
19+ -> Hash
20+ -> Seq Scan on t1
2121 (5 rows)
2222
2323 LOAD 'pg_hint_plan';
@@ -32,13 +32,13 @@ EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
3232 (4 rows)
3333
3434 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.val = t2.val;
35- QUERY PLAN
36--------------------------------------------
37- Merge Join
38- Merge Cond: (t2.val = t1.val)
39- -> Index Scan using t2_val on t2
40- -> Materialize
41- -> Index Scan using t1_val on t1
35+ QUERY PLAN
36+--------------------------------
37+ Hash Join
38+ Hash Cond: (t2.val = t1.val)
39+ -> Seq Scan on t2
40+ -> Hash
41+ -> Seq Scan on t1
4242 (5 rows)
4343
4444 /*+ Test (t1 t2) */
--- a/expected/ut-A.out
+++ b/expected/ut-A.out
@@ -2016,6 +2016,8 @@ ERROR: pg_hint_plan: hint syntax error at or near ""
20162016 DETAIL: Opening parenthesis is necessary.
20172017 SET client_min_messages TO fatal;
20182018 /*+Set*/SELECT 1;
2019+ERROR: pg_hint_plan: hint syntax error at or near ""
2020+DETAIL: Opening parenthesis is necessary.
20192021 -- No. A-8-4-11
20202022 RESET client_min_messages;
20212023 SET pg_hint_plan.parse_messages TO DEFAULT;
@@ -3226,6 +3228,7 @@ NestLoop(t1 t1)
32263228 SELECT name, setting FROM settings;
32273229 name | setting
32283230 ------------------------------+-----------
3231+ client_min_messages | log
32293232 geqo | on
32303233 geqo_effort | 5
32313234 geqo_generations | 0
@@ -3261,7 +3264,6 @@ SELECT name, setting FROM settings;
32613264 enable_seqscan | on
32623265 enable_sort | on
32633266 enable_tidscan | on
3264- client_min_messages | log
32653267 (36 rows)
32663268
32673269 SET pg_hint_plan.parse_messages TO error;
@@ -3272,6 +3274,7 @@ DETAIL: Relation name "t1" is duplicated.
32723274 SELECT name, setting FROM settings;
32733275 name | setting
32743276 ------------------------------+-----------
3277+ client_min_messages | log
32753278 geqo | on
32763279 geqo_effort | 5
32773280 geqo_generations | 0
@@ -3307,7 +3310,6 @@ SELECT name, setting FROM settings;
33073310 enable_seqscan | on
33083311 enable_sort | on
33093312 enable_tidscan | on
3310- client_min_messages | log
33113313 (36 rows)
33123314
33133315 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
@@ -3337,6 +3339,7 @@ error hint:
33373339 SELECT name, setting FROM settings;
33383340 name | setting
33393341 ------------------------------+-----------
3342+ client_min_messages | log
33403343 geqo | on
33413344 geqo_effort | 5
33423345 geqo_generations | 0
@@ -3372,7 +3375,6 @@ SELECT name, setting FROM settings;
33723375 enable_seqscan | on
33733376 enable_sort | on
33743377 enable_tidscan | on
3375- client_min_messages | log
33763378 (36 rows)
33773379
33783380 SET pg_hint_plan.parse_messages TO error;
@@ -3383,6 +3385,7 @@ DETAIL: Relation name "t1" is duplicated.
33833385 SELECT name, setting FROM settings;
33843386 name | setting
33853387 ------------------------------+-----------
3388+ client_min_messages | log
33863389 geqo | on
33873390 geqo_effort | 5
33883391 geqo_generations | 0
@@ -3418,7 +3421,6 @@ SELECT name, setting FROM settings;
34183421 enable_seqscan | on
34193422 enable_sort | on
34203423 enable_tidscan | on
3421- client_min_messages | log
34223424 (36 rows)
34233425
34243426 EXPLAIN (COSTS false) EXECUTE p1;
@@ -3437,6 +3439,7 @@ EXPLAIN (COSTS false) EXECUTE p1;
34373439 SELECT name, setting FROM settings;
34383440 name | setting
34393441 ------------------------------+-----------
3442+ client_min_messages | log
34403443 geqo | on
34413444 geqo_effort | 5
34423445 geqo_generations | 0
@@ -3472,7 +3475,6 @@ SELECT name, setting FROM settings;
34723475 enable_seqscan | on
34733476 enable_sort | on
34743477 enable_tidscan | on
3475- client_min_messages | log
34763478 (36 rows)
34773479
34783480 SET pg_hint_plan.parse_messages TO error;
@@ -3514,6 +3516,7 @@ EXPLAIN (COSTS false) EXECUTE p1;
35143516 SELECT name, setting FROM settings;
35153517 name | setting
35163518 ------------------------------+-----------
3519+ client_min_messages | log
35173520 geqo | on
35183521 geqo_effort | 5
35193522 geqo_generations | 0
@@ -3549,7 +3552,6 @@ SELECT name, setting FROM settings;
35493552 enable_seqscan | on
35503553 enable_sort | on
35513554 enable_tidscan | on
3552- client_min_messages | log
35533555 (36 rows)
35543556
35553557 -- No. A-12-1-4
@@ -3557,6 +3559,7 @@ SELECT name, setting FROM settings;
35573559 SELECT name, setting FROM settings;
35583560 name | setting
35593561 ------------------------------+-----------
3562+ client_min_messages | log
35603563 geqo | on
35613564 geqo_effort | 5
35623565 geqo_generations | 0
@@ -3592,7 +3595,6 @@ SELECT name, setting FROM settings;
35923595 enable_seqscan | on
35933596 enable_sort | on
35943597 enable_tidscan | on
3595- client_min_messages | log
35963598 (36 rows)
35973599
35983600 SET pg_hint_plan.parse_messages TO error;
@@ -3612,6 +3614,7 @@ EXPLAIN (COSTS false) EXECUTE p1;
36123614 SELECT name, setting FROM settings;
36133615 name | setting
36143616 ------------------------------+-----------
3617+ client_min_messages | log
36153618 geqo | on
36163619 geqo_effort | 5
36173620 geqo_generations | 0
@@ -3647,7 +3650,6 @@ SELECT name, setting FROM settings;
36473650 enable_seqscan | on
36483651 enable_sort | on
36493652 enable_tidscan | on
3650- client_min_messages | log
36513653 (36 rows)
36523654
36533655 DEALLOCATE p1;
@@ -3682,6 +3684,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
36823684 SELECT name, setting FROM settings;
36833685 name | setting
36843686 ------------------------------+-----------
3687+ client_min_messages | log
36853688 geqo | on
36863689 geqo_effort | 5
36873690 geqo_generations | 0
@@ -3717,7 +3720,6 @@ SELECT name, setting FROM settings;
37173720 enable_seqscan | on
37183721 enable_sort | on
37193722 enable_tidscan | on
3720- client_min_messages | log
37213723 (36 rows)
37223724
37233725 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
@@ -3744,6 +3746,7 @@ error hint:
37443746 SELECT name, setting FROM settings;
37453747 name | setting
37463748 ------------------------------+-----------
3749+ client_min_messages | log
37473750 geqo | on
37483751 geqo_effort | 5
37493752 geqo_generations | 0
@@ -3779,7 +3782,6 @@ SELECT name, setting FROM settings;
37793782 enable_seqscan | on
37803783 enable_sort | on
37813784 enable_tidscan | on
3782- client_min_messages | log
37833785 (36 rows)
37843786
37853787 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
@@ -3808,6 +3810,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
38083810 SELECT name, setting FROM settings;
38093811 name | setting
38103812 ------------------------------+-----------
3813+ client_min_messages | log
38113814 geqo | on
38123815 geqo_effort | 5
38133816 geqo_generations | 0
@@ -3843,7 +3846,6 @@ SELECT name, setting FROM settings;
38433846 enable_seqscan | on
38443847 enable_sort | on
38453848 enable_tidscan | on
3846- client_min_messages | log
38473849 (36 rows)
38483850
38493851 BEGIN;
@@ -3873,6 +3875,7 @@ BEGIN;
38733875 SELECT name, setting FROM settings;
38743876 name | setting
38753877 ------------------------------+-----------
3878+ client_min_messages | log
38763879 geqo | on
38773880 geqo_effort | 5
38783881 geqo_generations | 0
@@ -3908,7 +3911,6 @@ SELECT name, setting FROM settings;
39083911 enable_seqscan | on
39093912 enable_sort | on
39103913 enable_tidscan | on
3911- client_min_messages | log
39123914 (36 rows)
39133915
39143916 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
@@ -3938,6 +3940,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
39383940 SELECT name, setting FROM settings;
39393941 name | setting
39403942 ------------------------------+-----------
3943+ client_min_messages | log
39413944 geqo | on
39423945 geqo_effort | 5
39433946 geqo_generations | 0
@@ -3973,7 +3976,6 @@ SELECT name, setting FROM settings;
39733976 enable_seqscan | on
39743977 enable_sort | on
39753978 enable_tidscan | on
3976- client_min_messages | log
39773979 (36 rows)
39783980
39793981 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
@@ -4004,6 +4006,7 @@ LOAD 'pg_hint_plan';
40044006 SELECT name, setting FROM settings;
40054007 name | setting
40064008 ------------------------------+-----------
4009+ client_min_messages | notice
40074010 geqo | on
40084011 geqo_effort | 5
40094012 geqo_generations | 0
@@ -4039,7 +4042,6 @@ SELECT name, setting FROM settings;
40394042 enable_seqscan | on
40404043 enable_sort | on
40414044 enable_tidscan | on
4042- client_min_messages | notice
40434045 (36 rows)
40444046
40454047 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
--- a/expected/ut-S.out
+++ b/expected/ut-S.out
@@ -1888,7 +1888,7 @@ error hint:
18881888 Filter: (ctid = '(1,1)'::tid)
18891889 -> Bitmap Index Scan on t4_pkey
18901890 Index Cond: (c1 = b1t2.c1)
1891- InitPlan 2 (returns $4)
1891+ InitPlan 2 (returns $5)
18921892 -> Aggregate
18931893 -> Nested Loop
18941894 Join Filter: (b2t1.c1 = b2t4.c1)
@@ -1908,7 +1908,7 @@ error hint:
19081908 -> Index Scan using t4_pkey on t4 b2t4
19091909 Index Cond: (c1 = b2t2.c1)
19101910 Filter: (ctid = '(1,1)'::tid)
1911- InitPlan 3 (returns $7)
1911+ InitPlan 3 (returns $8)
19121912 -> Aggregate
19131913 -> Nested Loop
19141914 Join Filter: (b3t1.c1 = b3t2.c1)
@@ -1937,7 +1937,7 @@ error hint:
19371937 -> Nested Loop
19381938 Join Filter: (bmt1.c1 = bmt4.c1)
19391939 -> Seq Scan on t1 bmt1
1940- Filter: ((c1 <> $7) AND (ctid = '(1,1)'::tid))
1940+ Filter: ((c1 <> $8) AND (ctid = '(1,1)'::tid))
19411941 -> Tid Scan on t4 bmt4
19421942 TID Cond: (ctid = '(1,1)'::tid)
19431943 -> Index Scan using t2_pkey on t2 bmt2
@@ -2078,18 +2078,18 @@ error hint:
20782078 Filter: (ctid = '(1,1)'::tid)
20792079 -> Bitmap Index Scan on t4_pkey
20802080 Index Cond: (c1 = b1t2.c1)
2081- InitPlan 3 (returns $3)
2081+ InitPlan 3 (returns $4)
20822082 -> Result
2083- InitPlan 2 (returns $2)
2083+ InitPlan 2 (returns $3)
20842084 -> Limit
20852085 -> Bitmap Heap Scan on t1 b2t1
20862086 Recheck Cond: ((c1 IS NOT NULL) AND (c1 = 1))
20872087 Filter: (ctid = '(1,1)'::tid)
20882088 -> Bitmap Index Scan on t1_pkey
20892089 Index Cond: ((c1 IS NOT NULL) AND (c1 = 1))
2090- InitPlan 5 (returns $5)
2090+ InitPlan 5 (returns $6)
20912091 -> Result
2092- InitPlan 4 (returns $4)
2092+ InitPlan 4 (returns $5)
20932093 -> Limit
20942094 -> Index Scan Backward using t1_pkey on t1 b3t1
20952095 Index Cond: (c1 IS NOT NULL)
@@ -2103,7 +2103,7 @@ error hint:
21032103 -> Nested Loop
21042104 Join Filter: (bmt1.c1 = bmt4.c1)
21052105 -> Seq Scan on t1 bmt1
2106- Filter: ((c1 <> $5) AND (ctid = '(1,1)'::tid))
2106+ Filter: ((c1 <> $6) AND (ctid = '(1,1)'::tid))
21072107 -> Tid Scan on t4 bmt4
21082108 TID Cond: (ctid = '(1,1)'::tid)
21092109 -> Index Scan using t2_pkey on t2 bmt2
Show on old repository browser