{"Entry":{"collection":"func","key":"pg-cancel-backend","name":"pg_cancel_backend","aliases":[],"metadata":{"changed_in":["8.1"],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"7.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.0"},{"descriptions_changed":false,"doc_overhaul":false,"from":"8.0","group_changed":null,"signatures":{"added":["pg_cancel_backend ( pid int ) → boolean"],"removed":["pg_cancel_backend ( pid ) → int"]},"status":"changed","to":"8.1"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.1","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.2"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.4","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.5"},{"descriptions_changed":true,"doc_overhaul":false,"from":"9.5","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"9.6"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"14","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"15"},{"descriptions_changed":true,"doc_overhaul":false,"from":"17","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"18"}],"content_hash":"10397f2d18940a074699ff8b87c0bf79f419a0c8cafe5804824c35b7425c5b98","first_version":"8.0","group":"admin","group_label":"System Administration Functions","groups":["admin"],"imported_at":"2026-09-27T17:57:29.448424+08:00","last_version":"20","name":"pg_cancel_backend","name_key":"pg_cancel_backend","position":29015,"present_in":["8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"pg_cancel_backend ( pid integer ) → boolean","signature_count":1,"slug":"pg-cancel-backend","source_rev":"b7bd9cda","summary":"Cancels the current query of the session whose backend process has the specified process ID.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-cancel-backend","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-cancel-backend","SourceRevision":"b7bd9cda","Facts":{"description":"Cancels the current query of the session whose backend process has the specified process ID. This is also allowed if the calling role is a member of the role whose backend is being canceled or the calling role has privileges of pg_signal_backend, however only superusers can cancel superuser backends. As an exception, roles with privileges of pg_signal_autovacuum_worker are permitted to cancel autovacuum worker processes, which are otherwise considered superuser backends.","description_html":"Cancels the current query of the session whose backend process has the specified process ID. This is also allowed if the calling role is a member of the role whose backend is being canceled or the calling role has privileges of \u003ccode class=\"literal\"\u003epg_signal_backend\u003c/code\u003e, however only superusers can cancel superuser backends. As an exception, roles with privileges of \u003ccode class=\"literal\"\u003epg_signal_autovacuum_worker\u003c/code\u003e are permitted to cancel autovacuum worker processes, which are otherwise considered superuser backends.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-ADMIN-SIGNAL-TABLE","file":"functions-admin.html","slug":"18"},"group":"admin","group_label":"System Administration Functions","lang":"en","layout":"table-new","pages":["functions-admin.html"],"prose_only":false,"signatures":[{"description":"Cancels the current query of the session whose backend process has the specified process ID. This is also allowed if the calling role is a member of the role whose backend is being canceled or the calling role has privileges of pg_signal_backend, however only superusers can cancel superuser backends. As an exception, roles with privileges of pg_signal_autovacuum_worker are permitted to cancel autovacuum worker processes, which are otherwise considered superuser backends.","description_html":"Cancels the current query of the session whose backend process has the specified process ID. This is also allowed if the calling role is a member of the role whose backend is being canceled or the calling role has privileges of \u003ccode class=\"literal\"\u003epg_signal_backend\u003c/code\u003e, however only superusers can cancel superuser backends. As an exception, roles with privileges of \u003ccode class=\"literal\"\u003epg_signal_autovacuum_worker\u003c/code\u003e are permitted to cancel autovacuum worker processes, which are otherwise considered superuser backends.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_cancel_backend\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003epid\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eboolean\u003c/code\u003e","returns":"boolean","text":"pg_cancel_backend ( pid integer ) → boolean","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-ADMIN-SIGNAL-TABLE","file":"functions-admin.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-cancel-backend","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_cancel_backend","Summary":"取消具有指定进程ID的后端进程的会话的当前查询。如果调用角色是被取消的后端进程所属角色的成员，或者调用角色具有pg_signal_backend的权限，则也允许执行此操作，但只有超级用户可以取消超级用户后端进程。例外情况是，具有pg_signal_autovacuum_worker角色权限的角色可以取消 autovacuum 工作进程，而这些进程原本被视为超级用户后端。","BodyHTML":"取消具有指定进程ID的后端进程的会话的当前查询。如果调用角色是被取消的后端进程所属角色的成员，或者调用角色具有\u003ccode\u003epg_signal_backend\u003c/code\u003e的权限，则也允许执行此操作，但只有超级用户可以取消超级用户后端进程。例外情况是，具有\u003ccode\u003epg_signal_autovacuum_worker\u003c/code\u003e角色权限的角色可以取消 autovacuum 工作进程，而这些进程原本被视为超级用户后端。\u003cpre\u003epg_cancel_backend ( pid integer ) → boolean\u003c/pre\u003e取消具有指定进程ID的后端进程的会话的当前查询。如果调用角色是被取消的后端进程所属角色的成员，或者调用角色具有\u003ccode\u003epg_signal_backend\u003c/code\u003e的权限，则也允许执行此操作，但只有超级用户可以取消超级用户后端进程。例外情况是，具有\u003ccode\u003epg_signal_autovacuum_worker\u003c/code\u003e角色权限的角色可以取消 autovacuum 工作进程，而这些进程原本被视为超级用户后端。","SourceRevision":"ca936764","ContentHash":"1e43b1cf589134c697c806bb5752864b631bbe91f4fb3e7c77b44ca8bdcf5858","Payload":{"description_zh":"取消具有指定进程ID的后端进程的会话的当前查询。如果调用角色是被取消的后端进程所属角色的成员，或者调用角色具有pg_signal_backend的权限，则也允许执行此操作，但只有超级用户可以取消超级用户后端进程。例外情况是，具有pg_signal_autovacuum_worker角色权限的角色可以取消 autovacuum 工作进程，而这些进程原本被视为超级用户后端。","description_zh_html":"取消具有指定进程ID的后端进程的会话的当前查询。如果调用角色是被取消的后端进程所属角色的成员，或者调用角色具有\u003ccode class=\"literal\"\u003epg_signal_backend\u003c/code\u003e的权限，则也允许执行此操作，但只有超级用户可以取消超级用户后端进程。例外情况是，具有\u003ccode class=\"literal\"\u003epg_signal_autovacuum_worker\u003c/code\u003e角色权限的角色可以取消 autovacuum 工作进程，而这些进程原本被视为超级用户后端。","signatures":[{"description_zh":"取消具有指定进程ID的后端进程的会话的当前查询。如果调用角色是被取消的后端进程所属角色的成员，或者调用角色具有pg_signal_backend的权限，则也允许执行此操作，但只有超级用户可以取消超级用户后端进程。例外情况是，具有pg_signal_autovacuum_worker角色权限的角色可以取消 autovacuum 工作进程，而这些进程原本被视为超级用户后端。","description_zh_html":"取消具有指定进程ID的后端进程的会话的当前查询。如果调用角色是被取消的后端进程所属角色的成员，或者调用角色具有\u003ccode class=\"literal\"\u003epg_signal_backend\u003c/code\u003e的权限，则也允许执行此操作，但只有超级用户可以取消超级用户后端进程。例外情况是，具有\u003ccode class=\"literal\"\u003epg_signal_autovacuum_worker\u003c/code\u003e角色权限的角色可以取消 autovacuum 工作进程，而这些进程原本被视为超级用户后端。","returns":"boolean","text":"pg_cancel_backend ( pid integer ) → boolean","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"d3b21f0cc18c409fe44e1d42657a7b5710e24aa1fdd9a2eba3cddf8b3a75fbdb","Text":"pg_cancel_backend ( pid integer ) → boolean","Returns":"boolean","Payload":{"description":"Cancels the current query of the session whose backend process has the specified process ID. This is also allowed if the calling role is a member of the role whose backend is being canceled or the calling role has privileges of pg_signal_backend, however only superusers can cancel superuser backends. As an exception, roles with privileges of pg_signal_autovacuum_worker are permitted to cancel autovacuum worker processes, which are otherwise considered superuser backends.","description_html":"Cancels the current query of the session whose backend process has the specified process ID. This is also allowed if the calling role is a member of the role whose backend is being canceled or the calling role has privileges of \u003ccode class=\"literal\"\u003epg_signal_backend\u003c/code\u003e, however only superusers can cancel superuser backends. As an exception, roles with privileges of \u003ccode class=\"literal\"\u003epg_signal_autovacuum_worker\u003c/code\u003e are permitted to cancel autovacuum worker processes, which are otherwise considered superuser backends.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003epg_cancel_backend\u003c/code\u003e ( \u003cem class=\"parameter\"\u003e\u003ccode\u003epid\u003c/code\u003e\u003c/em\u003e \u003ccode class=\"type\"\u003einteger\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eboolean\u003c/code\u003e","returns":"boolean","text":"pg_cancel_backend ( pid integer ) → boolean","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
