Re: Cancel key now ready

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: hackers(at)postgresql(dot)org (PostgreSQL-development)
Subject: Re: Cancel key now ready
Date: 1998-06-08 16:57:23
Message-ID: 10662.897325043@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mark metzger 1998-06-08 17:03:53 [HACKERS] Upgrade improvements.
Previous Message Bruce Momjian 1998-06-08 16:24:06 Cancel key now ready