• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revision5da09533c001a834305276af566c93c4b38f46c7 (tree)
Time2020-02-13 19:40:39
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
@@ -8186,6 +8186,12 @@ END;
81868186 $$ VOLATILE LANGUAGE plpgsql;
81878187 vacuum analyze t1;
81888188 SET pg_hint_plan.enable_hint = false;
8189+SELECT pg_sleep(1);
8190+ pg_sleep
8191+----------
8192+
8193+(1 row)
8194+
81898195 SELECT reset_stats_and_wait();
81908196 reset_stats_and_wait
81918197 ----------------------
@@ -8211,6 +8217,12 @@ SELECT relname, seq_scan > 0 as seq_scan, idx_scan > 0 as idx_scan FROM pg_stat_
82118217 (1 row)
82128218
82138219 SET pg_hint_plan.enable_hint = true;
8220+SELECT pg_sleep(1);
8221+ pg_sleep
8222+----------
8223+
8224+(1 row)
8225+
82148226 SELECT reset_stats_and_wait();
82158227 reset_stats_and_wait
82168228 ----------------------
@@ -8259,6 +8271,12 @@ BEGIN
82598271 END;
82608272 $$ VOLATILE LANGUAGE plpgsql;
82618273 SET pg_hint_plan.enable_hint = false;
8274+SELECT pg_sleep(1);
8275+ pg_sleep
8276+----------
8277+
8278+(1 row)
8279+
82628280 SELECT reset_stats_and_wait();
82638281 reset_stats_and_wait
82648282 ----------------------
@@ -8286,6 +8304,12 @@ SELECT relname, seq_scan, idx_scan FROM pg_stat_user_tables WHERE schemaname = '
82868304 (2 rows)
82878305
82888306 SET pg_hint_plan.enable_hint = true;
8307+SELECT pg_sleep(1);
8308+ pg_sleep
8309+----------
8310+
8311+(1 row)
8312+
82898313 SELECT reset_stats_and_wait();
82908314 reset_stats_and_wait
82918315 ----------------------
--- a/sql/pg_hint_plan.sql
+++ b/sql/pg_hint_plan.sql
@@ -967,11 +967,13 @@ END;
967967 $$ VOLATILE LANGUAGE plpgsql;
968968 vacuum analyze t1;
969969 SET pg_hint_plan.enable_hint = false;
970+SELECT pg_sleep(1);
970971 SELECT reset_stats_and_wait();
971972 SELECT dynsql1(9000);
972973 SELECT pg_sleep(1);
973974 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';
974975 SET pg_hint_plan.enable_hint = true;
976+SELECT pg_sleep(1);
975977 SELECT reset_stats_and_wait();
976978 SELECT dynsql1(9000);
977979 SELECT pg_sleep(1);
@@ -992,12 +994,14 @@ BEGIN
992994 END;
993995 $$ VOLATILE LANGUAGE plpgsql;
994996 SET pg_hint_plan.enable_hint = false;
997+SELECT pg_sleep(1);
995998 SELECT reset_stats_and_wait();
996999 SELECT dynsql2(9000);
9971000 SELECT pg_sleep(1);
9981001 -- one of the index scans happened while planning.
9991002 SELECT relname, seq_scan, idx_scan FROM pg_stat_user_tables WHERE schemaname = 'public' AND (relname = 'p1_c1' OR relname = 'p1_c2');
10001003 SET pg_hint_plan.enable_hint = true;
1004+SELECT pg_sleep(1);
10011005 SELECT reset_stats_and_wait();
10021006 SELECT dynsql2(9000);
10031007 SELECT pg_sleep(1);
Show on old repository browser