Bruce Momjian <maillist@candle.pha.pa.us> writes:
> Now I need help in passing the value to the font-end, and having the
> front-end pass it to the backend for a cancel.
I can work on that. Have you checked the postmaster changes into cvs?
> I do not recommend passing the pid because I will store the cancel key
> in the per-backend structure, so having the pid does not help me find
> the backend. Might as well just scan the table to find the matching
> cancel key, and kill that backend. We will have to store the pid in
> the structure, but that is easy to do.
I don't like this. Backend PIDs are guaranteed unique (among active
backends); cancel keys are not guaranteed unique, unless you took some
special measure to make them so. So you could hit the wrong backend
if you only compare cancel keys. Since you must store the PID anyway to
send the signal, you may as well use both to verify that you have found
the right backend.
regards, tom lane