test: isolate pg_terminate_backend to appname
The pg_terminate_backend done in the io test: `test_fail_with_automatic_recovery_disabled_and_terminated_using_query` Can affect other connections.
This commit is contained in:
committed by
Steve Chavez
parent
d5a4c5609e
commit
bfa4e1bedb
@@ -187,8 +187,8 @@ where application_name ilike 'postgrest%'
|
||||
limit 1;
|
||||
$$;
|
||||
|
||||
create function terminate_pgrst() returns setof record as $$
|
||||
select pg_terminate_backend(pid) from pg_stat_activity where application_name iLIKE '%postgrest%';
|
||||
create function terminate_pgrst(appname text) returns setof record as $$
|
||||
select pg_terminate_backend(pid) from pg_stat_activity where application_name iLIKE '%' || appname || '%';
|
||||
$$ language sql security definer;
|
||||
|
||||
create or replace function one_sec_timeout() returns void as $$
|
||||
|
||||
Reference in New Issue
Block a user