diff options
author | Magnus Hagander <magnus@hagander.net> | 2012-01-15 15:34:40 +0100 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2012-01-15 15:34:40 +0100 |
commit | 0495aaad8b337642830a4d4e82f8b8c02b27b1be (patch) | |
tree | 599c5404822f9202b98e9f9809d06b3944b6df98 /doc/src | |
parent | 652300f5392f2d951b368c38f1cf123003e5e21e (diff) | |
download | postgresql-0495aaad8b337642830a4d4e82f8b8c02b27b1be.tar.gz postgresql-0495aaad8b337642830a4d4e82f8b8c02b27b1be.zip |
Allow a user to kill his own queries using pg_cancel_backend()
Allows a user to use pg_cancel_queries() to cancel queries in
other backends if they are running under the same role.
pg_terminate_backend() still requires superuser permissoins.
Short patch, many authors working on the bikeshed: Magnus Hagander,
Josh Kupershmidt, Edward Muller, Greg Smith.
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 2e06346584c..7d7aba7aeef 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -14262,8 +14262,8 @@ SELECT set_config('log_statement_stats', 'off', false); <para> The functions shown in <xref linkend="functions-admin-signal-table"> send control signals to - other server processes. Use of these functions is restricted - to superusers. + other server processes. Use of these functions is usually restricted + to superusers, with noted exceptions. </para> <table id="functions-admin-signal-table"> @@ -14280,7 +14280,10 @@ SELECT set_config('log_statement_stats', 'off', false); <literal><function>pg_cancel_backend(<parameter>pid</parameter> <type>int</>)</function></literal> </entry> <entry><type>boolean</type></entry> - <entry>Cancel a backend's current query</entry> + <entry>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. + </entry> </row> <row> <entry> @@ -14322,6 +14325,10 @@ SELECT set_config('log_statement_stats', 'off', false); <command>postgres</command> processes on the server (using <application>ps</> on Unix or the <application>Task Manager</> on <productname>Windows</>). + For the less restrictive <function>pg_cancel_backend</>, the role of an + active backend can be found from + the <structfield>usename</structfield> column of the + <structname>pg_stat_activity</structname> view. </para> <para> |