firtst release
修订版 | ae19f43d09e8bd15267ba57510440da7874c1575 (tree) |
---|---|
时间 | 2016-04-22 13:38:42 |
作者 | MasaoFujii <masao.fujii@gmai...> |
Commiter | MasaoFujii |
Use pg_reload_conf() to reload the configuration file in regression test.
Previously the regression test ran pg_ctl reload command for that purpose.
However in the environment where the path to PostgreSQL binaries is not set,
the regression test always failed because pg_ctl could not be found.
To reload the configuration file even in that environment, this commit
changes the regression test so that it uses pg_reload_conf function, instead.
@@ -154,8 +154,12 @@ CREATE VIEW v4 AS SELECT v_2.t1_id, t_3.id FROM v2 v_2, t3 t_3 WHERE v_2.t1_id = | ||
154 | 154 | */ |
155 | 155 | /* Fix auto-tunable parameters */ |
156 | 156 | ALTER SYSTEM SET effective_cache_size TO 16384; |
157 | -\! pg_ctl reload | |
158 | -server signaled | |
157 | +SELECT pg_reload_conf(); | |
158 | + pg_reload_conf | |
159 | +---------------- | |
160 | + t | |
161 | +(1 row) | |
162 | + | |
159 | 163 | SET effective_cache_size TO 16384; |
160 | 164 | CREATE VIEW settings AS |
161 | 165 | SELECT name, setting, category |
@@ -3,8 +3,12 @@ LOAD 'pg_hint_plan'; | ||
3 | 3 | DELETE FROM pg_db_role_setting WHERE setrole = (SELECT oid FROM pg_roles WHERE rolname = current_user); |
4 | 4 | INSERT INTO pg_db_role_setting (SELECT 0, (SELECT oid FROM pg_roles WHERE rolname = current_user), '{client_min_messages=log,pg_hint_plan.debug_print=on}'); |
5 | 5 | ALTER SYSTEM SET session_preload_libraries TO 'pg_hint_plan'; |
6 | -\! pg_ctl reload | |
7 | -server signaled | |
6 | +SELECT pg_reload_conf(); | |
7 | + pg_reload_conf | |
8 | +---------------- | |
9 | + t | |
10 | +(1 row) | |
11 | + | |
8 | 12 | SET pg_hint_plan.enable_hint TO on; |
9 | 13 | SET pg_hint_plan.debug_print TO on; |
10 | 14 | SET client_min_messages TO LOG; |
@@ -6193,5 +6197,9 @@ error hint: | ||
6193 | 6197 | |
6194 | 6198 | DELETE FROM pg_db_role_setting WHERE setrole = (SELECT oid FROM pg_roles WHERE rolname = current_user); |
6195 | 6199 | ALTER SYSTEM SET session_preload_libraries TO DEFAULT; |
6196 | -\! pg_ctl reload | |
6197 | -server signaled | |
6200 | +SELECT pg_reload_conf(); | |
6201 | + pg_reload_conf | |
6202 | +---------------- | |
6203 | + t | |
6204 | +(1 row) | |
6205 | + |
@@ -121,7 +121,7 @@ CREATE VIEW v4 AS SELECT v_2.t1_id, t_3.id FROM v2 v_2, t3 t_3 WHERE v_2.t1_id = | ||
121 | 121 | |
122 | 122 | /* Fix auto-tunable parameters */ |
123 | 123 | ALTER SYSTEM SET effective_cache_size TO 16384; |
124 | -\! pg_ctl reload | |
124 | +SELECT pg_reload_conf(); | |
125 | 125 | SET effective_cache_size TO 16384; |
126 | 126 | |
127 | 127 | CREATE VIEW settings AS |
@@ -3,7 +3,7 @@ LOAD 'pg_hint_plan'; | ||
3 | 3 | DELETE FROM pg_db_role_setting WHERE setrole = (SELECT oid FROM pg_roles WHERE rolname = current_user); |
4 | 4 | INSERT INTO pg_db_role_setting (SELECT 0, (SELECT oid FROM pg_roles WHERE rolname = current_user), '{client_min_messages=log,pg_hint_plan.debug_print=on}'); |
5 | 5 | ALTER SYSTEM SET session_preload_libraries TO 'pg_hint_plan'; |
6 | -\! pg_ctl reload | |
6 | +SELECT pg_reload_conf(); | |
7 | 7 | SET pg_hint_plan.enable_hint TO on; |
8 | 8 | SET pg_hint_plan.debug_print TO on; |
9 | 9 | SET client_min_messages TO LOG; |
@@ -1168,4 +1168,4 @@ EXPLAIN (COSTS false) SELECT * FROM s1.ti1 WHERE c2 = 1; | ||
1168 | 1168 | DELETE FROM pg_db_role_setting WHERE setrole = (SELECT oid FROM pg_roles WHERE rolname = current_user); |
1169 | 1169 | |
1170 | 1170 | ALTER SYSTEM SET session_preload_libraries TO DEFAULT; |
1171 | -\! pg_ctl reload | |
1171 | +SELECT pg_reload_conf(); |