From 85e07af6ca4675a26fa2281370c37371b883b2a9 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 26 Aug 2024 14:23:29 +0900 Subject: [PATCH] Improve stability of tests when compiling with --with-llvm Some tests have been generating diffs when linking pg_hint_plan to LLVM, and generated extra information in the plans without changing their stability. Let's disable JIT in the tests where this happened, for now, improving the stability of the tests. Per issue #199. Reported-by: Shinya Kato Backpatch-through: 17 --- expected/ut-J.out | 1 + expected/ut-R.out | 1 + expected/ut-S.out | 1 + sql/ut-J.sql | 1 + sql/ut-R.sql | 1 + sql/ut-S.sql | 1 + 6 files changed, 6 insertions(+) diff --git a/expected/ut-J.out b/expected/ut-J.out index a242d99..2fa3c70 100644 --- a/expected/ut-J.out +++ b/expected/ut-J.out @@ -4,6 +4,7 @@ SET pg_hint_plan.debug_print TO on; SET client_min_messages TO LOG; SET search_path TO public; SET max_parallel_workers_per_gather TO 0; +SET jit = off; EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; QUERY PLAN ------------------------------------ diff --git a/expected/ut-R.out b/expected/ut-R.out index 5bcdb02..46a32b1 100644 --- a/expected/ut-R.out +++ b/expected/ut-R.out @@ -2,6 +2,7 @@ LOAD 'pg_hint_plan'; SET pg_hint_plan.enable_hint TO on; SET pg_hint_plan.debug_print TO on; SET client_min_messages TO LOG; +SET jit = off; SET search_path TO public; SELECT explain_filter(' EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; diff --git a/expected/ut-S.out b/expected/ut-S.out index d3e40ba..0bfcfb8 100644 --- a/expected/ut-S.out +++ b/expected/ut-S.out @@ -4,6 +4,7 @@ SET pg_hint_plan.debug_print TO on; SET client_min_messages TO LOG; SET search_path TO public; SET max_parallel_workers_per_gather TO 0; +SET jit = off; EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1; QUERY PLAN --------------------- diff --git a/sql/ut-J.sql b/sql/ut-J.sql index 1e5e03d..79bea0a 100644 --- a/sql/ut-J.sql +++ b/sql/ut-J.sql @@ -4,6 +4,7 @@ SET pg_hint_plan.debug_print TO on; SET client_min_messages TO LOG; SET search_path TO public; SET max_parallel_workers_per_gather TO 0; +SET jit = off; EXPLAIN (COSTS false) SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; diff --git a/sql/ut-R.sql b/sql/ut-R.sql index e0fa019..4fe14e6 100644 --- a/sql/ut-R.sql +++ b/sql/ut-R.sql @@ -2,6 +2,7 @@ LOAD 'pg_hint_plan'; SET pg_hint_plan.enable_hint TO on; SET pg_hint_plan.debug_print TO on; SET client_min_messages TO LOG; +SET jit = off; SET search_path TO public; SELECT explain_filter(' EXPLAIN SELECT * FROM s1.t1, s1.t2 WHERE t1.c1 = t2.c1; diff --git a/sql/ut-S.sql b/sql/ut-S.sql index 5e622cb..3f3de1d 100644 --- a/sql/ut-S.sql +++ b/sql/ut-S.sql @@ -4,6 +4,7 @@ SET pg_hint_plan.debug_print TO on; SET client_min_messages TO LOG; SET search_path TO public; SET max_parallel_workers_per_gather TO 0; +SET jit = off; EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 >= 1; EXPLAIN (COSTS false) SELECT * FROM s1.t1 WHERE t1.c1 = 1;