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