• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revision22a770c5707099cd2da2c19b355c19e4347514a9 (tree)
Time2019-10-29 18:49:22
AuthorKyotaro Horiguchi <horikyota.ntt@gmai...>
CommiterKyotaro Horiguchi

Log Message

Fix regression tests.

Fix regression tests to work for PG12.

Change Summary

Incremental Difference

--- a/expected/pg_hint_plan.out
+++ b/expected/pg_hint_plan.out
@@ -5388,7 +5388,7 @@ ERROR: 1.23457e+63 is outside the valid range for parameter "cursor_tuple_fract
53885388 /*+ Set(enable_seqscan 100)Set(seq_page_cost on)*/
53895389 EXPLAIN (COSTS false) SELECT * FROM t1, t2 WHERE t1.id = t2.id;
53905390 INFO: parameter "enable_seqscan" requires a Boolean value
5391-INFO: parameter "seq_page_cost" requires a numeric value
5391+INFO: invalid value for parameter "seq_page_cost": "on"
53925392 LOG: pg_hint_plan:
53935393 used hint:
53945394 not used hint:
@@ -8181,6 +8181,12 @@ END;
81818181 $$ VOLATILE LANGUAGE plpgsql;
81828182 vacuum analyze t1;
81838183 SET pg_hint_plan.enable_hint = false;
8184+SELECT pg_sleep(1);
8185+ pg_sleep
8186+----------
8187+
8188+(1 row)
8189+
81848190 SELECT reset_stats_and_wait();
81858191 reset_stats_and_wait
81868192 ----------------------
--- a/expected/ut-S.out
+++ b/expected/ut-S.out
@@ -5085,6 +5085,8 @@ error hint:
50855085 EXPLAIN (COSTS false) UPDATE s1.p1 SET c4 = c4 WHERE c1 = 1;
50865086 LOG: available indexes for IndexScan(p1): p1_pkey
50875087 LOG: available indexes for IndexScan(p1c1): p1c1_pkey
5088+LOG: available indexes for IndexScan(p1): p1_pkey
5089+LOG: available indexes for IndexScan(p1c1): p1c1_pkey
50885090 LOG: pg_hint_plan:
50895091 used hint:
50905092 IndexScan(p1 p1_pkey)
--- a/expected/ut-W.out
+++ b/expected/ut-W.out
@@ -1216,6 +1216,7 @@ Parallel()
12161216 -- Hints on unhintable relations are just ignored
12171217 /*+Parallel(p1 5 hard) Parallel(s1 3 hard) IndexScan(ft1) SeqScan(cte1)
12181218 TidScan(fs1) IndexScan(t) IndexScan(*VALUES*) */
1219+\o results/ut-W.tmpout
12191220 EXPLAIN (COSTS false) SELECT id FROM p1_c1_c1 as s1 TABLESAMPLE SYSTEM(10)
12201221 UNION ALL
12211222 SELECT id FROM ft1
@@ -1238,15 +1239,17 @@ Parallel(s1 3 hard)
12381239 duplication hint:
12391240 error hint:
12401241
1241- QUERY PLAN
1242------------------------------------------------------------------------------------------------
1242+\o
1243+\! sql/maskout2.sh results/ut-W.tmpout
1244+ QUERY PLAN
1245+--(snip..)
12431246 Append
12441247 -> Result
12451248 -> Append
12461249 -> Sample Scan on p1_c1_c1 s1
12471250 Sampling: system ('10'::real)
12481251 -> Foreign Scan on ft1
1249- Foreign File: /home/horiguti/work/pg_hint_plan/pg_hint_plan/data/data.csv
1252+ Foreign File: (snip..)
12501253 -> Gather
12511254 Workers Planned: 5
12521255 -> Parallel Append
--- /dev/null
+++ b/sql/maskout2.sh
@@ -0,0 +1,3 @@
1+#! /bin/sh
2+cat $1 | \
3+sed 's/^-\+$/--(snip..)/;s/^\( \+Foreign File: \).*$/\1 (snip..)/'
--- a/sql/pg_hint_plan.sql
+++ b/sql/pg_hint_plan.sql
@@ -971,6 +971,7 @@ END;
971971 $$ VOLATILE LANGUAGE plpgsql;
972972 vacuum analyze t1;
973973 SET pg_hint_plan.enable_hint = false;
974+SELECT pg_sleep(1);
974975 SELECT reset_stats_and_wait();
975976 SELECT dynsql1(9000);
976977 SELECT pg_sleep(1);
--- a/sql/ut-W.sql
+++ b/sql/ut-W.sql
@@ -205,6 +205,7 @@ EXPLAIN (COSTS false) SELECT id FROM p1 UNION ALL SELECT id FROM p2;
205205 -- Hints on unhintable relations are just ignored
206206 /*+Parallel(p1 5 hard) Parallel(s1 3 hard) IndexScan(ft1) SeqScan(cte1)
207207 TidScan(fs1) IndexScan(t) IndexScan(*VALUES*) */
208+\o results/ut-W.tmpout
208209 EXPLAIN (COSTS false) SELECT id FROM p1_c1_c1 as s1 TABLESAMPLE SYSTEM(10)
209210 UNION ALL
210211 SELECT id FROM ft1
@@ -214,7 +215,8 @@ SELECT id FROM ft1
214215 SELECT userid FROM pg_stat_statements fs1
215216 UNION ALL
216217 SELECT x FROM (VALUES (1), (2), (3)) t(x);
217-
218+\o
219+\! sql/maskout2.sh results/ut-W.tmpout
218220
219221 ALTER SYSTEM SET session_preload_libraries TO DEFAULT;
220222 SELECT pg_reload_conf();
Show on old repository browser