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
This is working as designed and is a design feature from PostgreSQL:
Function Name | Return Type | Description |
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. |