Re: Killing postgres processes. - Mailing list pgsql-novice

From Tom Lane
Subject Re: Killing postgres processes.
Date
Msg-id 13690.1027543110@sss.pgh.pa.us
Whole thread Raw
In response to Killing postgres processes.  (Adam Bultman <adam.bultman@iconideas.com>)
List pgsql-novice
Adam Bultman <adam.bultman@iconideas.com> writes:
> Greetings.  I've got a postgres server that's being hit rather heavily.
> I have many processes inititated by users (they start scripts running).
> Because of user impatience and idiocy, despite my explanations, they
> continue to re-run the script and not wait for the script to end the
> first time (i.e. 'why isn't it finishing? <click click click>'). So, I
> have about 9 postgres SELECTS going on right now that are pretty much
> runaway and useless.  Can I safely kill these without fubaring things?

Yes.  Best bet is to send them SIGINT, which will cause a clean query
cancel, and then they'll notice the client connection went away and
quit.  More drastic measures might fool the postmaster into thinking
that a backend crashed, in which case it'll force a database-wide
restart, which you probably don't want.

            regards, tom lane

pgsql-novice by date:

Previous
From: Josh Berkus
Date:
Subject: Re: maximum size of psql query file
Next
From: Jesús López
Date:
Subject: extract text and store in postgres