Re: Resources - Mailing list pgsql-sql

From Tom Lane
Subject Re: Resources
Date
Msg-id 23072.1010700580@sss.pgh.pa.us
Whole thread Raw
In response to Re: Resources  (Wei Weng <wweng@kencast.com>)
List pgsql-sql
Wei Weng <wweng@kencast.com> writes:
> I have a side question. How do I stop this kind of crazy query to suck up
> my CPU power if it is fed by a database driver? (like ODBC, for example)
> Since kill -9 postmaster is highly not recommended, can i do a
> /sbin/service postgresql stop to force it to shut down?

That would shut down the whole database, which is likely not what you
want.  The best way to cancel a runaway query is to cancel it, ie,
send a cancel request from the client (cf. control-C in psql, dunno
whether the ODBC driver supports this).  If you are logged into the
postgres or root account on the DB machine, you can get the same
effect with "kill -INT pid-of-backend".  (not pid-of-postmaster)
        regards, tom lane


pgsql-sql by date:

Previous
From: "elisabeth maniez"
Date:
Subject: Re: create table with multiple unique fields
Next
From: Tom Lane
Date:
Subject: Re: Postgres vs. Redhat DB