当前位置:网站首页>Gbase 8C server signal function
Gbase 8C server signal function
2022-07-28 01:55:00 【Dazhuang twelve】
The server signal function sends control signals to other server processes . Only system administrators can use these functions .
pg_cancel_backend(pid int)
describe : Cancel the current query of a backend .
return type :Boolean
remarks :pg_cancel_backend Go from pid The identified backend process sends a query to cancel (SIGINT) The signal . Of an active backend process PID It can be downloaded from pg_stat_activity View's pid Field found , Or use it on the server ps List database processes . have SYSADMIN Privileged user , The owner of the database to which the backend process is connected , The owner of the back-end process or inherits the built-in role gs_role_signal_backend Users with permission have the right to use this function .
pg_reload_conf()
describe : Cause all server processes to reload their configuration files ( System administrator role is required ).
return type :Boolean
remarks :pg_reload_conf Send a... To the server SIGHUP The signal , Cause all server processes to reload configuration files .
pg_rotate_logfile()
describe : Scroll the log files of the server ( System administrator role is required ).
return type :Boolean
remarks :pg_rotate_logfile Send a signal to the log file manager , Tell it to switch to a new output file immediately . This function can only be used in redirect_stderr It is only useful for log output , Otherwise, there is no log file manager subprocess .
pg_terminate_backend(pid int)
describe : Terminate a background thread .
return type :Boolean
remarks : If it works , The function returns true, Otherwise return to false. have SYSADMIN Privileged user , The owner of the database to which the backend process is connected , The owner of the back-end process or inherits the built-in role gs_role_signal_backend Users with permission have the right to use this function .
Example :
gbase=# SELECT pid from pg_stat_activity;
pid
-----------------
140573611915008
140573668599552
140574052771584
140573954000640
140574121588480
140574004344576
140573970781952
140573987563264
(8 rows)
gbase=# SELECT pg_terminate_backend(140573987563264);
pg_terminate_backend
----------------------
t
(1 row)
pg_terminate_session(pid int64, sessionid int64)
describe : Terminate a background session.
return type :Boolean
remarks : If it works , The function returns true, Otherwise return to false. have SYSADMIN Privileged user , The owner of the database to which the session is connected , The owner of the session or inherits the built-in role gs_role_signal_backend Users with permission have the right to use this function .
边栏推荐
- 腾讯云HiFlow场景连接器
- Summary: Prometheus storage
- [add pictures to dice roller app]
- Lambda表达式和Stream流
- 面试官:你确定Redis是单线程的进程吗?
- LeetCode高频题128. 最长连续序列,经常被互联网大厂面试考到
- unreal ue4.27 switchboard 移植出引擎流程
- N32L43x Flash读\写\擦除操作总结
- Realize OCR language recognition demo (II) - display and interaction of pictures and recognition content
- Leetcode high frequency question 128. the longest continuous sequence, which is often tested in interviews with Internet companies
猜你喜欢
随机推荐
GBase 8c 事务ID和快照(三)
Interview question 01.08. Zero matrix
GBase 8c 服务器信号函数
数商云供应链集采管理系统解决方案:集采系统管理模式,数字化管控企业物资
Tencent cloud hiflow scene connector
Qlib tutorial - based on source code (II) local data saving and loading
Linux系统彻底删除Mysql
FreeRTOS内核小结
总结:Prometheus存储
Leetcode: 515. Find the maximum value in each tree row
Matlab 44 animation gradient drawing programs
Lambda表达式和Stream流
Introduction to routing strategy
Modify the request path using the streaming API of gateway
N32L43x Flash读\写\擦除操作总结
VLAN实验
LeetCode高频题128. 最长连续序列,经常被互联网大厂面试考到
Introduction to QT drawing system
股票问题5连
Dpdk plug-in of VPP







![[interview: concurrent article 28:volatile] orderliness](/img/8d/c4c2ca08d8883e997709d208b7395b.png)
![[add pictures to dice roller app]](/img/36/c5c01946bd8c4ea16ebd3f8f9b92b6.png)