• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revisionb526f3286ac6c79702889fa7c978991bff59b439 (tree)
Time2020-02-13 20:42:45
AuthorJunseok Yang <protodef@gmai...>
CommiterKyotaro Horiguchi

Log Message

Use tuple-only mode to stablize EXPLAIN output containing @abs_srcdir@.

The line containing @abs_srcdir@ can be longer than the header line
and if it is, the test will fail. Use tuple-only mode to get rid of
the unstable part from the EXPLAIN output.

Change Summary

Incremental Difference

--- a/output/ut-W.source
+++ b/output/ut-W.source
@@ -909,6 +909,9 @@ Parallel()
909909 -> Parallel Seq Scan on p2_c3_c2
910910 (21 rows)
911911
912+-- Use tuples-only mode so that long \@abs_srcdir\@ won't let the
913+-- following query make an unstable result.
914+\t
912915 -- Hints on unhintable relations are just ignored
913916 /*+Parallel(p1 5 hard) Parallel(s1 3 hard) IndexScan(ft1) SeqScan(cte1)
914917 TidScan(fs1) IndexScan(t) IndexScan(*VALUES*) */
@@ -934,8 +937,6 @@ Parallel(s1 3 hard)
934937 duplication hint:
935938 error hint:
936939
937- QUERY PLAN
938------------------------------------------------------------------------------------------------
939940 Append
940941 -> Result
941942 -> Append
@@ -969,8 +970,9 @@ error hint:
969970 -> Function Scan on pg_stat_statements
970971 -> Subquery Scan on "*SELECT* 5"
971972 -> Values Scan on "*VALUES*"
972-(33 rows)
973973
974+-- Turn off tuples-only mode
975+\t
974976 ALTER SYSTEM SET session_preload_libraries TO DEFAULT;
975977 SELECT pg_reload_conf();
976978 pg_reload_conf
--- a/sql/ut-W.sql
+++ b/sql/ut-W.sql
@@ -170,6 +170,9 @@ EXPLAIN (COSTS false) SELECT * FROM p1;
170170 Parallel(p1 8 hoge)Parallel(p1)Parallel(p1 100 soft x)*/
171171 EXPLAIN (COSTS false) SELECT id FROM p1 UNION ALL SELECT id FROM p2;
172172
173+-- Use tuples-only mode so that long \@abs_srcdir\@ won't let the
174+-- following query make an unstable result.
175+\t
173176 -- Hints on unhintable relations are just ignored
174177 /*+Parallel(p1 5 hard) Parallel(s1 3 hard) IndexScan(ft1) SeqScan(cte1)
175178 TidScan(fs1) IndexScan(t) IndexScan(*VALUES*) */
@@ -183,6 +186,7 @@ SELECT userid FROM pg_stat_statements fs1
183186 UNION ALL
184187 SELECT x FROM (VALUES (1), (2), (3)) t(x);
185188
186-
189+-- Turn off tuples-only mode
190+\t
187191 ALTER SYSTEM SET session_preload_libraries TO DEFAULT;
188192 SELECT pg_reload_conf();
Show on old repository browser