Michael Glaesemann wrote:
On Jan 4, 2011, at 17:29, Bryce Nesbitt wrote:
Should I expect pg_cancel_backend() to work in a case like this? If not does
this sound like a reportable bug?
pg_cancel_backend() cancels the running query for that backend. In the case
of<IDLE>, there is no running query for that backend.
Likely you're looking for pg_terminate_backend().
Michael Glaesemann
grzm seespotcode net
Hmm, yes. Though it seems to not be in the documentation, or, for that
matter, the current code:
utils/adt/misc.c
#*ifdef* NOT_USED
//* Disabled in 8.0 due to reliability concerns; FIXME someday *//
*pg_terminate_backend*(PG_FUNCTION_ARGS
# select pg_terminate_backend(5);
ERROR: function pg_terminate_backend(integer) does not exist
LINE 1: select pg_terminate_backend(5);
^
HINT: No function matches the given name and argument types. You might
need to add explicit type casts.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql