{"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","derived_content_hash":"f1472088010743533862c0e3c923b5ce6a102f937738a77b09b289dfc65b4721","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:6eaa57899a78c3b028fd71277ceee64baf2c5b3c0e9c0f87702e797eb5dd4bbb","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"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"],"repair_provenance":{"original_source_revision":"wiki-repair-20261023:a29f82acf7f046537d4d2368f9b26bda310b0809b1124e6ba4906ba3196d41fc","receipt_sha256":"cfbb5d1c7a4c165383310ae1e3ae214c3ce81497ae54074798eabbfa44350475","repair":"wiki-repair-20261023"},"signature":"pg_cancel_backend ( pid integer ) → boolean","signature_count":1,"slug":"pg-cancel-backend","source_rev":"wiki-repair-20261023:6eaa57899a78c3b028fd71277ceee64baf2c5b3c0e9c0f87702e797eb5dd4bbb","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":"wiki-repair-20261023:6eaa57899a78c3b028fd71277ceee64baf2c5b3c0e9c0f87702e797eb5dd4bbb","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":"取消具有指定进程 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 工作进程，而这些进程原本被视为超级用户后端。","doc":{"anchor":"FUNCTIONS-ADMIN-SIGNAL-TABLE","file":"functions-admin.html","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","slug":"18"},"documentation_revision":{"inputs":[{"file":"functions-admin.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","version":"18.7"},{"file":"functions-admin.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"830e894d29fec30b7c350c915fcaed4a63b24d57f2c96150bf25fa07fb43849c","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"group":"admin","group_label":"系统管理函数","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":"取消具有指定进程 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 工作进程，而这些进程原本被视为超级用户后端。","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":"same-version-manual"}],"translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/functions-admin.html","sha256":"b4fab9daceb7883fd75b32b6eb5398f2bbbfbbed5c83d1b2bf99cc8d842cdaf7"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-ADMIN-SIGNAL-TABLE","file":"functions-admin.html","sha256":"885561d57facd49c33b44a50e320a002197d700d118784cc87d6410efadbd1f6","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-cancel-backend","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_cancel_backend","Summary":"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.","BodyHTML":"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\u003epg_signal_backend\u003c/code\u003e, however only superusers can cancel superuser backends. As an exception, roles with privileges of \u003ccode\u003epg_signal_autovacuum_worker\u003c/code\u003e are permitted to cancel autovacuum worker processes, which are otherwise considered superuser backends.","SourceRevision":"wiki-repair-20261023:6eaa57899a78c3b028fd71277ceee64baf2c5b3c0e9c0f87702e797eb5dd4bbb","ContentHash":"168e46c8c991a0319c9a860251c6ccd857d6f185b741d9e4fdc30e6399806512","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.","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":"取消具有指定进程 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 工作进程，而这些进程原本被视为超级用户后端。","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":"same-version-manual"}]}},"RequestedLocale":"en","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":"取消具有指定进程 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 工作进程，而这些进程原本被视为超级用户后端。","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":"same-version-manual"}}],"Spellings":null,"SQLState":null,"Evidence":null}
