From: Bryce Nesbitt <bryce2@obviously.com>
To: pgsql-sql@postgresql.org
Cc: Michael Glaesemann <grzm@seespotcode.net>
Subject: Re: "<IDLE> in transaction" can't be killed with pg_cancel_backend(). Is it a bug?
Date: Tue, 04 Jan 2011 14:47:41 -0800
Message-ID: <4D23A38D.1010700@obviously.com> (raw)
In-Reply-To: <6EEECA52-4293-405D-8124-A04A02D40F3E@seespotcode.net>
References: <4D239F51.2000102@obviously.com>
<6EEECA52-4293-405D-8124-A04A02D40F3E@seespotcode.net>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bryce2@obviously.com, grzm@seespotcode.net
Subject: Re: "<IDLE> in transaction" can't be killed with pg_cancel_backend(). Is it a bug?
In-Reply-To: <4D23A38D.1010700@obviously.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox