数据仓库服务 GAUSSDB(DWS)-服务器信号函数:pg_terminate_backend(pid int)

时间:2024-12-06 15:12:39

pg_terminate_backend(pid int)

描述:终止一个后台线程。

返回值类型:boolean

备注:如果成功,函数返回true,否则返回false。

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
SELECT pid FROM pg_stat_activity;
       pid       
-----------------
 140657876268816
 140433774061312
 140433587902208
 140433656592128
 140433723717376
 140433637189376
 140433552770816
 140433481983744
 140433349310208
(9 rows)

SELECT pg_terminate_backend(140657876268816);
 pg_terminate_backend 
----------------------
 t
(1 row)
support.huaweicloud.com/sqlreference-910-dws/dws_06_0055.html