Re: Plans for 8.2?

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: "H(dot)J(dot) Sanders" <hjs(at)rmax(dot)nl>, pgsql-general(at)postgresql(dot)org
Subject: Re: Plans for 8.2?
Date: 2006-01-13 22:18:14
Message-ID: 20060113221814.GW9017@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 13, 2006 at 02:59:47PM -0700, Michael Fuhr wrote:
> On Fri, Jan 13, 2006 at 03:40:48PM -0600, Jim C. Nasby wrote:
> > It strikes me that if we had a way to abort a statement on another
> > backend, you could abort anything that's been waiting more than x
> > seconds for a lock via an external process watching pg_locks. Of course,
> > that would be much more cumbersom than SET LOCK MODE TO WAIT n...
>
> There's pg_cancel_backend(), but a mechanism like you describe seems
> subject to race conditions: by the time you decide to cancel a query
> and send the signal, the offending query might have completed and
> you end up cancelling some subsequent query that just started.

Yeah, to make it useable you'd probably need to do something like expose
cid via pg_locks and have a pg_cancel_backend(cid) that would only
cancel that command.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2006-01-13 22:26:39 Re: Plans for 8.2?
Previous Message Jim C. Nasby 2006-01-13 22:14:16 Re: Plans for 8.2?