Dan Harris <fbsd(at)drivefaster(dot)net> writes:
> So, I have been searching for a way to kill an individual query. I read
> in the mailing list archives that you could 'kill' the pid. I've tried
> this a few times and more than once, it has caused the postmaster to
> die(!), terminating every query that was in process, even unrelated to
> that query.
You should be using SIGINT, not SIGTERM.
regards, tom lane