From: Kevin Grittner <kgrittn@ymail.com>
To: niallfr@btinternet.com <niallfr@btinternet.com>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13518: CancelRequest lacks statement identifier
Date: Tue, 28 Jul 2015 19:41:18 +0000 (UTC)
Message-ID: <773925395.3977925.1438112478191.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <20150724180236.2737.27011@wrigleys.postgresql.org>
References: <20150724180236.2737.27011@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
"niallfr@btinternet.com" <niallfr@btinternet.com> wrote:
> If CancelRequest could include a statement name (or other means
> of identifying a statement) and did nothing if that statement was
> no longer running by the time the server processed it, the
> usability of CancelRequest would be significantly enhanced.
Would it be sufficient for your purposes to cancel a *transaction*
rather than a *statement*? There is already a virtual transaction
ID exposed in pg_locks, and it could probably be added to
pg_stat_activity; we could probably create a
pg_cancel_transaction() function that took a text representation of
that and only canceled the transaction if it was running. There
would need to be locking on a heavily contended lock or two to make
that happen correctly, but presumably this would not ba a
high-volume activity.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: kgrittn@ymail.com, niallfr@btinternet.com
Subject: Re: BUG #13518: CancelRequest lacks statement identifier
In-Reply-To: <773925395.3977925.1438112478191.JavaMail.yahoo@mail.yahoo.com>
References: <20150724180236.2737.27011@wrigleys.postgresql.org> <773925395.3977925.1438112478191.JavaMail.yahoo@mail.yahoo.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