File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 1
1
alter function net ._encode_url_with_params_array ( text , text []) strict;
2
- alter table net .http_request_queue drop constraint http_request_queue_pkey;
3
- alter table net ._http_response drop constraint _http_response_pkey;
2
+
3
+ alter table net .http_request_queue drop constraint http_request_queue_pkey cascade;
4
+ alter table net ._http_response drop constraint _http_response_pkey cascade;
5
+
4
6
drop trigger ensure_worker_is_up on net .http_request_queue ;
5
- alter function net ._check_worker_is_up () rename to check_worker_is_up;
6
- drop index net ._http_response_created_idx ;
7
+ drop function net ._check_worker_is_up ();
8
+
9
+ create or replace function net .check_worker_is_up() returns void as $$
10
+ begin
11
+ if not exists (select pid from pg_stat_activity where backend_type = ' pg_net worker' ) then
12
+ raise exception using
13
+ message = ' the pg_net background worker is not up'
14
+ , detail = ' the pg_net background worker is down due to an internal error and cannot process requests'
15
+ , hint = ' make sure that you didn' ' t modify any of pg_net internal tables' ;
16
+ end if;
17
+ end
18
+ $$ language plpgsql;
19
+
20
+ drop index if exists net ._http_response_created_idx ;
21
+
7
22
alter table net .http_request_queue set unlogged;
8
23
alter table net ._http_response set unlogged;
You can’t perform that action at this time.
0 commit comments