Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-10 Thread Tom Lane
Csaba Nagy <[EMAIL PROTECTED]> writes: > How does this apply to autovacuum's long running vacuum commands ? Cause > I have one table where the last vacuum took 15 hours :-) [ Checks code... ] No, statement_timeout only applies to commands arriving from an interactive client. This *would* be a ha

Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-10 Thread Csaba Nagy
> You do know that statement_timeout can be changed freely via SET, > right? One way to attack this would be for the clients that are > issuing known long-running queries to do "SET statement_timeout" > to boost up their allowed runtime. How does this apply to autovacuum's long running vacuum com

Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-10 Thread Tom Lane
Tony Wasson <[EMAIL PROTECTED]> writes: > I am also interested in being able to terminate *certain* long running > queries. I didn't want to use statement_timeout because there are some > queries that must run for a long time - in our case some queries that > create summary tables. Other long runni

Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-10 Thread Scott Marlowe
On Fri, 2006-02-10 at 09:31, Tony Wasson wrote: > On 2/9/06, Michael Fuhr <[EMAIL PROTECTED]> wrote: > > On Fri, Feb 10, 2006 at 11:30:04AM +0700, Luki Rustianto wrote: > > > So how can we terminate such a long running query ? > > > > > > The idea is to make a crontab to periodicaly do a job to sea

Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-10 Thread Dave Page
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tony Wasson > Sent: 10 February 2006 15:31 > To: Michael Fuhr > Cc: Luki Rustianto; Merlin Moncure; pgsql-general@postgresql.org > Subject: Re: [GENERAL] Is there a way to lim

Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-10 Thread Tony Wasson
On 2/9/06, Michael Fuhr <[EMAIL PROTECTED]> wrote: > On Fri, Feb 10, 2006 at 11:30:04AM +0700, Luki Rustianto wrote: > > So how can we terminate such a long running query ? > > > > The idea is to make a crontab to periodicaly do a job to search a > > typical "SELECT * FROM bigtable" query who has r

Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-09 Thread Michael Fuhr
On Fri, Feb 10, 2006 at 11:30:04AM +0700, Luki Rustianto wrote: > So how can we terminate such a long running query ? > > The idea is to make a crontab to periodicaly do a job to search a > typical "SELECT * FROM bigtable" query who has run for some hours then > to terminate them... Are you famil

Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-09 Thread Luki Rustianto
So how can we terminate such a long running query ? The idea is to make a crontab to periodicaly do a job to search a typical "SELECT * FROM bigtable" query who has run for some hours then to terminate them... On 2/9/06, Merlin Moncure <[EMAIL PROTECTED]> wrote: > > Is there a way to limit user

Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-09 Thread Scott Marlowe
On Wed, 2006-02-08 at 15:42, Merlin Moncure wrote: > > Is there a way to limit user's CPU resource specially on "SELECT" query ? > > > > I hava a table with a lot of rows inside, if one sloopy DB users do a > > "SELECT * FROM bigtable" > > then CPU resource will go near 99% and this action will sur

Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-08 Thread Merlin Moncure
> Is there a way to limit user's CPU resource specially on "SELECT" query ? > > I hava a table with a lot of rows inside, if one sloopy DB users do a > "SELECT * FROM bigtable" > then CPU resource will go near 99% and this action will surely affect > the other database performance ... > Yes, the an

Re: [GENERAL] Is there a way to limit CPU usage per user

2006-02-08 Thread Richard Huxton
Luki Rustianto wrote: Hi All, Is there a way to limit user's CPU resource specially on "SELECT" query ? I hava a table with a lot of rows inside, if one sloopy DB users do a "SELECT * FROM bigtable" then CPU resource will go near 99% and this action will surely affect the other database perform

[GENERAL] Is there a way to limit CPU usage per user

2006-02-07 Thread Luki Rustianto
Hi All, Is there a way to limit user's CPU resource specially on "SELECT" query ? I hava a table with a lot of rows inside, if one sloopy DB users do a "SELECT * FROM bigtable" then CPU resource will go near 99% and this action will surely affect the other database performance ... Thanks. -