Only a superuser has permission to run the pg_cancel_backend() and pg_terminate_backend() functions
search cancel

Only a superuser has permission to run the pg_cancel_backend() and pg_terminate_backend() functions

book

Article ID: 296277

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Only a superuser has permission to run the pg_cancel_backend() and pg_terminate_backend() function in VMware Tanzu Greenplum.

If a normal user (non-super user) tries to run these two functions, it will report the following error:

gpadmin=> select pg_terminate_backend(xxxx);
ERROR: must be superuser to signal other server processes​


Environment

Product Version: 5.0

Resolution

This is working as designed and is a design feature from PostgreSQL:
 

Function NameReturn TypeDescription
 pg_cancel_backend(pid int)  boolean Cancel a backend's current query. You can execute this against another backend that has exactly the same role as the user calling the function. In all other cases, you must be a superuser.