• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revisionbf5a32526af21fb7c5f05440fd643e6dcec621e1 (tree)
Time2020-02-13 20:39:39
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
@@ -1214,6 +1214,9 @@ Parallel()
12141214 -> Parallel Seq Scan on p2_c3
12151215 (21 rows)
12161216
1217+-- Use tuples-only mode so that long \@abs_srcdir\@ won't let the
1218+-- following query make an unstable result.
1219+\t
12171220 -- Hints on unhintable relations are just ignored
12181221 /*+Parallel(p1 5 hard) Parallel(s1 3 hard) IndexScan(ft1) SeqScan(cte1)
12191222 TidScan(fs1) IndexScan(t) IndexScan(*VALUES*) */
@@ -1239,8 +1242,6 @@ Parallel(s1 3 hard)
12391242 duplication hint:
12401243 error hint:
12411244
1242- QUERY PLAN
1243------------------------------------------------------------------------------------------------
12441245 Append
12451246 -> Result
12461247 -> Append
@@ -1274,8 +1275,9 @@ error hint:
12741275 -> Function Scan on pg_stat_statements
12751276 -> Subquery Scan on "*SELECT* 5"
12761277 -> Values Scan on "*VALUES*"
1277-(33 rows)
12781278
1279+-- Turn off tuples-only mode
1280+\t
12791281 ALTER SYSTEM SET session_preload_libraries TO DEFAULT;
12801282 SELECT pg_reload_conf();
12811283 pg_reload_conf
--- a/sql/ut-W.sql
+++ b/sql/ut-W.sql
@@ -203,6 +203,9 @@ EXPLAIN (COSTS false) SELECT * FROM p1;
203203 Parallel(p1 8 hoge)Parallel(p1)Parallel(p1 100 soft x)*/
204204 EXPLAIN (COSTS false) SELECT id FROM p1 UNION ALL SELECT id FROM p2;
205205
206+-- Use tuples-only mode so that long \@abs_srcdir\@ won't let the
207+-- following query make an unstable result.
208+\t
206209 -- Hints on unhintable relations are just ignored
207210 /*+Parallel(p1 5 hard) Parallel(s1 3 hard) IndexScan(ft1) SeqScan(cte1)
208211 TidScan(fs1) IndexScan(t) IndexScan(*VALUES*) */
@@ -216,6 +219,7 @@ SELECT userid FROM pg_stat_statements fs1
216219 UNION ALL
217220 SELECT x FROM (VALUES (1), (2), (3)) t(x);
218221
219-
222+-- Turn off tuples-only mode
223+\t
220224 ALTER SYSTEM SET session_preload_libraries TO DEFAULT;
221225 SELECT pg_reload_conf();
Show on old repository browser