• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revision653f5ce584ee652829f1a4b6c37f42c905565b8b (tree)
Time2019-02-26 15:36:44
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
@@ -168,8 +168,9 @@ SELECT name, setting, category
168168 OR name = 'client_min_messages'
169169 ORDER BY category, name;
170170 SELECT * FROM settings;
171- name | setting | category
172-----------------------------+-----------+---------------------------------------------
171+ name | setting | category
172+----------------------------+-----------+-------------------------------------------------
173+ client_min_messages | notice | Client Connection Defaults / Statement Behavior
173174 geqo | on | Query Tuning / Genetic Query Optimizer
174175 geqo_effort | 5 | Query Tuning / Genetic Query Optimizer
175176 geqo_generations | 0 | Query Tuning / Genetic Query Optimizer
@@ -203,7 +204,6 @@ SELECT * FROM settings;
203204 enable_seqscan | on | Query Tuning / Planner Method Configuration
204205 enable_sort | on | Query Tuning / Planner Method Configuration
205206 enable_tidscan | on | Query Tuning / Planner Method Configuration
206- client_min_messages | notice | Reporting and Logging / When to Log
207207 (34 rows)
208208
209209 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
@@ -2101,6 +2101,8 @@ ERROR: pg_hint_plan: hint syntax error at or near ""
21012101 DETAIL: Opening parenthesis is necessary.
21022102 SET client_min_messages TO fatal;
21032103 /*+Set*/SELECT 1;
2104+ERROR: pg_hint_plan: hint syntax error at or near ""
2105+DETAIL: Opening parenthesis is necessary.
21042106 -- No. A-8-4-11
21052107 RESET client_min_messages;
21062108 SET pg_hint_plan.parse_messages TO DEFAULT;
@@ -3311,6 +3313,7 @@ NestLoop(t1 t1)
33113313 SELECT name, setting FROM settings;
33123314 name | setting
33133315 ----------------------------+-----------
3316+ client_min_messages | log
33143317 geqo | on
33153318 geqo_effort | 5
33163319 geqo_generations | 0
@@ -3344,7 +3347,6 @@ SELECT name, setting FROM settings;
33443347 enable_seqscan | on
33453348 enable_sort | on
33463349 enable_tidscan | on
3347- client_min_messages | log
33483350 (34 rows)
33493351
33503352 SET pg_hint_plan.parse_messages TO error;
@@ -3355,6 +3357,7 @@ DETAIL: Relation name "t1" is duplicated.
33553357 SELECT name, setting FROM settings;
33563358 name | setting
33573359 ----------------------------+-----------
3360+ client_min_messages | log
33583361 geqo | on
33593362 geqo_effort | 5
33603363 geqo_generations | 0
@@ -3388,7 +3391,6 @@ SELECT name, setting FROM settings;
33883391 enable_seqscan | on
33893392 enable_sort | on
33903393 enable_tidscan | on
3391- client_min_messages | log
33923394 (34 rows)
33933395
33943396 /*+Set(enable_seqscan off)Set(geqo_threshold 100)SeqScan(t1)MergeJoin(t1 t2)*/
@@ -3418,6 +3420,7 @@ error hint:
34183420 SELECT name, setting FROM settings;
34193421 name | setting
34203422 ----------------------------+-----------
3423+ client_min_messages | log
34213424 geqo | on
34223425 geqo_effort | 5
34233426 geqo_generations | 0
@@ -3451,7 +3454,6 @@ SELECT name, setting FROM settings;
34513454 enable_seqscan | on
34523455 enable_sort | on
34533456 enable_tidscan | on
3454- client_min_messages | log
34553457 (34 rows)
34563458
34573459 SET pg_hint_plan.parse_messages TO error;
@@ -3462,6 +3464,7 @@ DETAIL: Relation name "t1" is duplicated.
34623464 SELECT name, setting FROM settings;
34633465 name | setting
34643466 ----------------------------+-----------
3467+ client_min_messages | log
34653468 geqo | on
34663469 geqo_effort | 5
34673470 geqo_generations | 0
@@ -3495,7 +3498,6 @@ SELECT name, setting FROM settings;
34953498 enable_seqscan | on
34963499 enable_sort | on
34973500 enable_tidscan | on
3498- client_min_messages | log
34993501 (34 rows)
35003502
35013503 EXPLAIN (COSTS false) EXECUTE p1;
@@ -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
@@ -3547,7 +3550,6 @@ SELECT name, setting FROM settings;
35473550 enable_seqscan | on
35483551 enable_sort | on
35493552 enable_tidscan | on
3550- client_min_messages | log
35513553 (34 rows)
35523554
35533555 SET pg_hint_plan.parse_messages TO error;
@@ -3589,6 +3591,7 @@ EXPLAIN (COSTS false) EXECUTE p1;
35893591 SELECT name, setting FROM settings;
35903592 name | setting
35913593 ----------------------------+-----------
3594+ client_min_messages | log
35923595 geqo | on
35933596 geqo_effort | 5
35943597 geqo_generations | 0
@@ -3622,7 +3625,6 @@ SELECT name, setting FROM settings;
36223625 enable_seqscan | on
36233626 enable_sort | on
36243627 enable_tidscan | on
3625- client_min_messages | log
36263628 (34 rows)
36273629
36283630 -- No. A-12-1-4
@@ -3630,6 +3632,7 @@ SELECT name, setting FROM settings;
36303632 SELECT name, setting FROM settings;
36313633 name | setting
36323634 ----------------------------+-----------
3635+ client_min_messages | log
36333636 geqo | on
36343637 geqo_effort | 5
36353638 geqo_generations | 0
@@ -3663,7 +3666,6 @@ SELECT name, setting FROM settings;
36633666 enable_seqscan | on
36643667 enable_sort | on
36653668 enable_tidscan | on
3666- client_min_messages | log
36673669 (34 rows)
36683670
36693671 SET pg_hint_plan.parse_messages TO error;
@@ -3683,6 +3685,7 @@ EXPLAIN (COSTS false) EXECUTE p1;
36833685 SELECT name, setting FROM settings;
36843686 name | setting
36853687 ----------------------------+-----------
3688+ client_min_messages | log
36863689 geqo | on
36873690 geqo_effort | 5
36883691 geqo_generations | 0
@@ -3716,7 +3719,6 @@ SELECT name, setting FROM settings;
37163719 enable_seqscan | on
37173720 enable_sort | on
37183721 enable_tidscan | on
3719- client_min_messages | log
37203722 (34 rows)
37213723
37223724 DEALLOCATE p1;
@@ -3751,6 +3753,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
37513753 SELECT name, setting FROM settings;
37523754 name | setting
37533755 ----------------------------+-----------
3756+ client_min_messages | log
37543757 geqo | on
37553758 geqo_effort | 5
37563759 geqo_generations | 0
@@ -3784,7 +3787,6 @@ SELECT name, setting FROM settings;
37843787 enable_seqscan | on
37853788 enable_sort | on
37863789 enable_tidscan | on
3787- client_min_messages | log
37883790 (34 rows)
37893791
37903792 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
@@ -3811,6 +3813,7 @@ error hint:
38113813 SELECT name, setting FROM settings;
38123814 name | setting
38133815 ----------------------------+-----------
3816+ client_min_messages | log
38143817 geqo | on
38153818 geqo_effort | 5
38163819 geqo_generations | 0
@@ -3844,7 +3847,6 @@ SELECT name, setting FROM settings;
38443847 enable_seqscan | on
38453848 enable_sort | on
38463849 enable_tidscan | on
3847- client_min_messages | log
38483850 (34 rows)
38493851
38503852 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
@@ -3873,6 +3875,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
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
@@ -3906,7 +3909,6 @@ SELECT name, setting FROM settings;
39063909 enable_seqscan | on
39073910 enable_sort | on
39083911 enable_tidscan | on
3909- client_min_messages | log
39103912 (34 rows)
39113913
39123914 BEGIN;
@@ -3936,6 +3938,7 @@ BEGIN;
39363938 SELECT name, setting FROM settings;
39373939 name | setting
39383940 ----------------------------+-----------
3941+ client_min_messages | log
39393942 geqo | on
39403943 geqo_effort | 5
39413944 geqo_generations | 0
@@ -3969,7 +3972,6 @@ SELECT name, setting FROM settings;
39693972 enable_seqscan | on
39703973 enable_sort | on
39713974 enable_tidscan | on
3972- client_min_messages | log
39733975 (34 rows)
39743976
39753977 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
@@ -3999,6 +4001,7 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
39994001 SELECT name, setting FROM settings;
40004002 name | setting
40014003 ----------------------------+-----------
4004+ client_min_messages | log
40024005 geqo | on
40034006 geqo_effort | 5
40044007 geqo_generations | 0
@@ -4032,7 +4035,6 @@ SELECT name, setting FROM settings;
40324035 enable_seqscan | on
40334036 enable_sort | on
40344037 enable_tidscan | on
4035- client_min_messages | log
40364038 (34 rows)
40374039
40384040 /*+Set(enable_indexscan on)Set(geqo_threshold 100)IndexScan(t2)MergeJoin(t1 t2)Leading(t2 t1)*/
@@ -4063,6 +4065,7 @@ LOAD 'pg_hint_plan';
40634065 SELECT name, setting FROM settings;
40644066 name | setting
40654067 ----------------------------+-----------
4068+ client_min_messages | notice
40664069 geqo | on
40674070 geqo_effort | 5
40684071 geqo_generations | 0
@@ -4096,7 +4099,6 @@ SELECT name, setting FROM settings;
40964099 enable_seqscan | on
40974100 enable_sort | on
40984101 enable_tidscan | on
4099- client_min_messages | notice
41004102 (34 rows)
41014103
41024104 EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1;
--- a/expected/ut-S.out
+++ b/expected/ut-S.out
@@ -1905,7 +1905,7 @@ error hint:
19051905 Filter: (ctid = '(1,1)'::tid)
19061906 -> Bitmap Index Scan on t4_pkey
19071907 Index Cond: (c1 = b1t1.c1)
1908- InitPlan 2 (returns $4)
1908+ InitPlan 2 (returns $5)
19091909 -> Aggregate
19101910 -> Nested Loop
19111911 -> Nested Loop
@@ -1923,7 +1923,7 @@ error hint:
19231923 -> Index Scan using t4_pkey on t4 b2t4
19241924 Index Cond: (c1 = b2t1.c1)
19251925 Filter: (ctid = '(1,1)'::tid)
1926- InitPlan 3 (returns $7)
1926+ InitPlan 3 (returns $8)
19271927 -> Aggregate
19281928 -> Nested Loop
19291929 Join Filter: (b3t1.c1 = b3t4.c1)
@@ -1948,7 +1948,7 @@ error hint:
19481948 -> Nested Loop
19491949 -> Nested Loop
19501950 -> Seq Scan on t1 bmt1
1951- Filter: ((c1 <> $7) AND (ctid = '(1,1)'::tid))
1951+ Filter: ((c1 <> $8) AND (ctid = '(1,1)'::tid))
19521952 -> Index Scan using t2_pkey on t2 bmt2
19531953 Index Cond: (c1 = bmt1.c1)
19541954 Filter: (ctid = '(1,1)'::tid)
@@ -2087,18 +2087,18 @@ error hint:
20872087 Filter: (ctid = '(1,1)'::tid)
20882088 -> Bitmap Index Scan on t4_pkey
20892089 Index Cond: (c1 = b1t1.c1)
2090- InitPlan 3 (returns $3)
2090+ InitPlan 3 (returns $4)
20912091 -> Result
2092- InitPlan 2 (returns $2)
2092+ InitPlan 2 (returns $3)
20932093 -> Limit
20942094 -> Bitmap Heap Scan on t1 b2t1
20952095 Recheck Cond: ((c1 IS NOT NULL) AND (c1 = 1))
20962096 Filter: (ctid = '(1,1)'::tid)
20972097 -> Bitmap Index Scan on t1_pkey
20982098 Index Cond: ((c1 IS NOT NULL) AND (c1 = 1))
2099- InitPlan 5 (returns $5)
2099+ InitPlan 5 (returns $6)
21002100 -> Result
2101- InitPlan 4 (returns $4)
2101+ InitPlan 4 (returns $5)
21022102 -> Limit
21032103 -> Index Scan Backward using t1_pkey on t1 b3t1
21042104 Index Cond: (c1 IS NOT NULL)
@@ -2110,7 +2110,7 @@ error hint:
21102110 -> Nested Loop
21112111 -> Nested Loop
21122112 -> Seq Scan on t1 bmt1
2113- Filter: ((c1 <> $5) AND (ctid = '(1,1)'::tid))
2113+ Filter: ((c1 <> $6) AND (ctid = '(1,1)'::tid))
21142114 -> Index Scan using t2_pkey on t2 bmt2
21152115 Index Cond: (c1 = bmt1.c1)
21162116 Filter: (ctid = '(1,1)'::tid)
Show on old repository browser