pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wei Weng <wweng@kencast.com>
Cc: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Resources
Date: Thu, 10 Jan 2002 17:09:40 -0500
Message-ID: <23072.1010700580@sss.pgh.pa.us> (raw)
In-Reply-To: <20020110153346.41367a49.wweng@kencast.com>
References: <4423720517.20020110190329@indvalley.com>
	<20020110080801.G82370-100000@megazone23.bigpanda.com>
	<20020110153346.41367a49.wweng@kencast.com>

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



view thread (18+ messages)  latest in thread

Message-ID: <23072.1010700580@sss.pgh.pa.us>
Permalink:  ../23072.1010700580@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23072.1010700580@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, wweng@kencast.com, sszabo@megazone23.bigpanda.com
  Subject: Re: Resources
  In-Reply-To: <23072.1010700580@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox