[GENERAL] killing processes

2009-07-20 Thread David Kerr
What's the generally accepted method for killing processes that went 'all wacky' in postgres? I think i've seen in this group that kill -INT would be the way to go. I'm playing around with different options for a median function. this one got out of hand and was taking too long, so i wanted to

Re: [GENERAL] killing processes

2009-07-20 Thread Scott Marlowe
On Mon, Jul 20, 2009 at 4:44 PM, David Kerr wrote: > What's the generally accepted method for killing processes that went 'all > wacky' in postgres? > > I think i've seen in this group that kill -INT would be the way to go. > > I'm playing around with different options for a median function. this

Re: [GENERAL] killing processes

2009-07-20 Thread Merlin Moncure
On Mon, Jul 20, 2009 at 6:48 PM, Scott Marlowe wrote: > On Mon, Jul 20, 2009 at 4:44 PM, David Kerr wrote: >> What's the generally accepted method for killing processes that went 'all >> wacky' in postgres? >> >> I think i've seen in this group that kill -INT would be the way to go. >> >> I'm play

Re: [GENERAL] killing processes

2009-07-20 Thread Tom Lane
Scott Marlowe writes: > On Mon, Jul 20, 2009 at 4:44 PM, David Kerr wrote: >> I'm playing around with different options for a median function. this one >> got out of hand >> and was taking too long, so i wanted to kill it: >> >> test=# select array_median(array(select t1 from test2 order by 1));

Re: [GENERAL] killing processes

2009-07-20 Thread David Kerr
On Mon, Jul 20, 2009 at 07:18:07PM -0400, Merlin Moncure wrote: - On Mon, Jul 20, 2009 at 6:48 PM, Scott Marlowe wrote: - > On Mon, Jul 20, 2009 at 4:44 PM, David Kerr wrote: - > What's most likely happening is that it's stuck in a tight loop that - > doesn't check for interrupts, so it just keeps

Re: [GENERAL] killing processes

2009-07-20 Thread Tom Lane
David Kerr writes: > But, i don't see any coded loop or way for me to insert a signal check. (I'm > not much of a > programmer) the function was just: > CREATE OR REPLACE FUNCTION array_median(anyarray) > RETURNS anyelement AS > $$ > SELECT CASE > WH

Re: [GENERAL] killing processes

2009-07-21 Thread David Kerr
On Mon, Jul 20, 2009 at 11:14:22PM -0400, Tom Lane wrote: - David Kerr writes: - > But, i don't see any coded loop or way for me to insert a signal check. (I'm not much of a - > programmer) the function was just: - - > CREATE OR REPLACE FUNCTION array_median(anyarray) - > RETURNS anyelement AS

Re: [GENERAL] killing processes

2009-07-21 Thread Tom Lane
David Kerr writes: > On Mon, Jul 20, 2009 at 11:14:22PM -0400, Tom Lane wrote: > - Huh. How big an array were you trying to invoke it on? > there are 81 records in the table it's just > test=# \d test2 >Table "public.test2" > Column | Type | Modifiers > +---

Re: [GENERAL] killing processes

2009-07-21 Thread David Kerr
On Tue, Jul 21, 2009 at 01:13:18PM -0400, Tom Lane wrote: - David Kerr writes: - I tried it on a table with 81 random values. It took frickin' - forever, but seemed to be willing to respond to cancels anywhere - along the line. I'm not sure why you're seeing differently. Hehe, yeah. For me

Re: [GENERAL] killing processes

2009-07-21 Thread Chris Spotts
> - type, and access into a varwidth array is O(n), so the sorting > - step you've got here is O(n^2). It might help to use unnest() > - instead of this handmade version of it ...) > > unnest() is 8.4 only, right? > > I'm actually probably just going to install R and use the median > function fr

Re: [GENERAL] killing processes

2009-07-21 Thread Merlin Moncure
On Tue, Jul 21, 2009 at 1:47 PM, David Kerr wrote: > On Tue, Jul 21, 2009 at 01:13:18PM -0400, Tom Lane wrote: > - David Kerr writes: > - I tried it on a table with 81 random values.  It took frickin' > - forever, but seemed to be willing to respond to cancels anywhere > - along the line.  I'm