Re: Limiting processor power on queries - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Limiting processor power on queries
Date
Msg-id 200305140818.31338.josh@agliodbs.com
Whole thread Raw
In response to Limiting processor power on queries  ("Chad Thompson" <chad@weblinkservices.com>)
Responses Re: Limiting processor power on queries
List pgsql-novice
Chad,

> 1) Is there some way to kill a query in 7.3?
>     I have seen that it was on the todo list back in the 6.x days, but
> wasnt able to find anything on it lately.

Two ways:
1) Better: terminate the query at the client end by terminating the requesting
process.  For example, in PSQL hit CTL-C.
2) Not So Good:  "Kill" the connnection process on the client end."SIGHUP"
kills are best if they work, but I have had to do KILL -9 on runaway
procedures to get them to stop.

> 2) Is there a way to limit the processing power for a query based on a)
> from where the query originated (eg. IP address) or b) the type of query it
> is. (eg. select vs. insert)

You cannot cap CPU usage in *any* way unless you are using a "real time
operating system", like QNX or Real Time Linux, or some of the radical
patches for Linux kernel 2.5.  And PostgreSQL has not been ported to any of
those systems AFAIK, so you're on your own ...

--
Josh Berkus
Aglio Database Solutions
San Francisco

pgsql-novice by date:

Previous
From: "Chad Thompson"
Date:
Subject: Re: Limiting processor power on queries
Next
From: Josh Berkus
Date:
Subject: Re: can't alter user with the postgres user