Skip to content

Commit

Permalink
Remove use of session_preload_libraries in regression tests
Browse files Browse the repository at this point in the history
session_preload_libraries was not really required with its set of ALTER
DATABASE SET commands to updates some GUCs.  There were equivalent LOAD
and SET commands used in the tests where session_preload_libraries was
defined, and the same GUCs were set twice.

This simplifies the tests, while shaving some cycles to run the tests.

Backpatch-through: 17
  • Loading branch information
michaelpq committed Aug 20, 2024
1 parent e92d75f commit 0c08be4
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 30 deletions.
1 change: 0 additions & 1 deletion expected/ut-G.out
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,6 @@ error hint:
Filter: ((ctid = '(1,1)'::tid) AND (c1 = 1))
(65 rows)

RESET client_min_messages;
----
---- No. G-2-1 GUC parameter
----
Expand Down
7 changes: 0 additions & 7 deletions expected/ut-S.out
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
LOAD 'pg_hint_plan';
-- Force some GUCs.
SELECT current_database() AS datname \gset
ALTER DATABASE :"datname" SET client_min_messages = 'log';
ALTER DATABASE :"datname" SET pg_hint_plan.debug_print = 'on';
ALTER DATABASE :"datname" SET session_preload_libraries TO 'pg_hint_plan';
-- Force GUC reload with a reconnection
\c
SET pg_hint_plan.enable_hint TO on;
SET pg_hint_plan.debug_print TO on;
SET client_min_messages TO LOG;
Expand Down
8 changes: 0 additions & 8 deletions expected/ut-W.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
LOAD 'pg_hint_plan';
ALTER SYSTEM SET session_preload_libraries TO '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;
Expand Down Expand Up @@ -1424,10 +1423,3 @@ error hint:
Filter: ((id % 2) = 0)
(28 rows)

ALTER SYSTEM SET session_preload_libraries TO DEFAULT;
SELECT pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)

2 changes: 0 additions & 2 deletions sql/ut-G.sql
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ Set(enable_tidscan off)Set(enable_nestloop off)
*/
EXPLAIN (COSTS false) UPDATE s1.r3_ SET c1 = c1 WHERE c1 = 1 AND ctid = '(1,1)';

RESET client_min_messages;

----
---- No. G-2-1 GUC parameter
----
Expand Down
8 changes: 0 additions & 8 deletions sql/ut-S.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
LOAD 'pg_hint_plan';

-- Force some GUCs.
SELECT current_database() AS datname \gset
ALTER DATABASE :"datname" SET client_min_messages = 'log';
ALTER DATABASE :"datname" SET pg_hint_plan.debug_print = 'on';
ALTER DATABASE :"datname" SET session_preload_libraries TO 'pg_hint_plan';
-- Force GUC reload with a reconnection
\c
SET pg_hint_plan.enable_hint TO on;
SET pg_hint_plan.debug_print TO on;
SET client_min_messages TO LOG;
Expand Down
4 changes: 0 additions & 4 deletions sql/ut-W.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
LOAD 'pg_hint_plan';
ALTER SYSTEM SET session_preload_libraries TO '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;
Expand Down Expand Up @@ -233,6 +232,3 @@ SELECT id FROM ft1
UNION ALL
SELECT x FROM (VALUES (1), (2), (3)) t(x);
');

ALTER SYSTEM SET session_preload_libraries TO DEFAULT;
SELECT pg_reload_conf();

0 comments on commit 0c08be4

Please sign in to comment.