• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revisiona47f7ee11be550c537a06152c41efc9b87f4049c (tree)
Time2020-02-13 15:43:19
AuthorKyotaro Horiguchi <horikyota.ntt@gmai...>
CommiterKyotaro Horiguchi

Log Message

Stabilize regression test.

Further unstability is found about stats reset. Inserted more 1 second
sleeps to stabilize it.

Change Summary

Incremental Difference

--- a/expected/pg_hint_plan.out
+++ b/expected/pg_hint_plan.out
@@ -8201,6 +8201,12 @@ END;
82018201 $$ VOLATILE LANGUAGE plpgsql;
82028202 vacuum analyze t1;
82038203 SET pg_hint_plan.enable_hint = false;
8204+SELECT pg_sleep(1);
8205+ pg_sleep
8206+----------
8207+
8208+(1 row)
8209+
82048210 SELECT reset_stats_and_wait();
82058211 reset_stats_and_wait
82068212 ----------------------
@@ -8226,6 +8232,12 @@ SELECT relname, seq_scan > 0 as seq_scan, idx_scan > 0 as idx_scan FROM pg_stat_
82268232 (1 row)
82278233
82288234 SET pg_hint_plan.enable_hint = true;
8235+SELECT pg_sleep(1);
8236+ pg_sleep
8237+----------
8238+
8239+(1 row)
8240+
82298241 SELECT reset_stats_and_wait();
82308242 reset_stats_and_wait
82318243 ----------------------
@@ -8274,6 +8286,12 @@ BEGIN
82748286 END;
82758287 $$ VOLATILE LANGUAGE plpgsql;
82768288 SET pg_hint_plan.enable_hint = false;
8289+SELECT pg_sleep(1);
8290+ pg_sleep
8291+----------
8292+
8293+(1 row)
8294+
82778295 SELECT reset_stats_and_wait();
82788296 reset_stats_and_wait
82798297 ----------------------
@@ -8301,6 +8319,12 @@ SELECT relname, seq_scan, idx_scan FROM pg_stat_user_tables WHERE schemaname = '
83018319 (2 rows)
83028320
83038321 SET pg_hint_plan.enable_hint = true;
8322+SELECT pg_sleep(1);
8323+ pg_sleep
8324+----------
8325+
8326+(1 row)
8327+
83048328 SELECT reset_stats_and_wait();
83058329 reset_stats_and_wait
83068330 ----------------------
--- a/sql/pg_hint_plan.sql
+++ b/sql/pg_hint_plan.sql
@@ -971,11 +971,13 @@ 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);
977978 SELECT relname, seq_scan > 0 as seq_scan, idx_scan > 0 as idx_scan FROM pg_stat_user_tables WHERE schemaname = 'public' AND relname = 't1';
978979 SET pg_hint_plan.enable_hint = true;
980+SELECT pg_sleep(1);
979981 SELECT reset_stats_and_wait();
980982 SELECT dynsql1(9000);
981983 SELECT pg_sleep(1);
@@ -996,12 +998,14 @@ BEGIN
996998 END;
997999 $$ VOLATILE LANGUAGE plpgsql;
9981000 SET pg_hint_plan.enable_hint = false;
1001+SELECT pg_sleep(1);
9991002 SELECT reset_stats_and_wait();
10001003 SELECT dynsql2(9000);
10011004 SELECT pg_sleep(1);
10021005 -- one of the index scans happened while planning.
10031006 SELECT relname, seq_scan, idx_scan FROM pg_stat_user_tables WHERE schemaname = 'public' AND (relname = 'p1_c1' OR relname = 'p1_c2');
10041007 SET pg_hint_plan.enable_hint = true;
1008+SELECT pg_sleep(1);
10051009 SELECT reset_stats_and_wait();
10061010 SELECT dynsql2(9000);
10071011 SELECT pg_sleep(1);
Show on old repository browser