• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revision88d3fb3e9d4b4cf344ba1e81049f953674a54b47 (tree)
Time2020-02-13 20:44:35
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
@@ -885,6 +885,9 @@ Parallel()
885885 -> Parallel Seq Scan on p2_c3_c2
886886 (21 rows)
887887
888+-- Use tuples-only mode so that long \@abs_srcdir\@ won't let the
889+-- following query make an unstable result.
890+\t
888891 -- Hints on unhintable relations are just ignored
889892 /*+Parallel(p1 5 hard) Parallel(s1 3 hard) IndexScan(ft1) SeqScan(cte1)
890893 TidScan(fs1) IndexScan(t) IndexScan(*VALUES*) */
@@ -910,8 +913,6 @@ Parallel(s1 3 hard)
910913 duplication hint:
911914 error hint:
912915
913- QUERY PLAN
914------------------------------------------------------------------------------------------------
915916 Append
916917 -> Result
917918 -> Append
@@ -945,8 +946,9 @@ error hint:
945946 -> Function Scan on pg_stat_statements
946947 -> Subquery Scan on "*SELECT* 5"
947948 -> Values Scan on "*VALUES*"
948-(33 rows)
949949
950+-- Turn off tuples-only mode
951+\t
950952 ALTER SYSTEM SET session_preload_libraries TO DEFAULT;
951953 SELECT pg_reload_conf();
952954 pg_reload_conf
--- a/sql/ut-W.sql
+++ b/sql/ut-W.sql
@@ -157,6 +157,9 @@ EXPLAIN (COSTS false) SELECT * FROM p1;
157157 Parallel(p1 8 hoge)Parallel(p1)Parallel(p1 100 soft x)*/
158158 EXPLAIN (COSTS false) SELECT id FROM p1 UNION ALL SELECT id FROM p2;
159159
160+-- Use tuples-only mode so that long \@abs_srcdir\@ won't let the
161+-- following query make an unstable result.
162+\t
160163 -- Hints on unhintable relations are just ignored
161164 /*+Parallel(p1 5 hard) Parallel(s1 3 hard) IndexScan(ft1) SeqScan(cte1)
162165 TidScan(fs1) IndexScan(t) IndexScan(*VALUES*) */
@@ -170,6 +173,7 @@ SELECT userid FROM pg_stat_statements fs1
170173 UNION ALL
171174 SELECT x FROM (VALUES (1), (2), (3)) t(x);
172175
173-
176+-- Turn off tuples-only mode
177+\t
174178 ALTER SYSTEM SET session_preload_libraries TO DEFAULT;
175179 SELECT pg_reload_conf();
Show on old repository browser