Re: pg_terminate_backend for same-role

Поиск
Список
Период
Сортировка
От Daniel Farina
Тема Re: pg_terminate_backend for same-role
Дата
Msg-id CAAZKuFbUxCNxyLThu8EjRVwf+yTnQbuNF_zZyTK2Jx5JHYYcLA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_terminate_backend for same-role  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: pg_terminate_backend for same-role
Список pgsql-hackers
On Thu, Mar 15, 2012 at 9:39 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> Shall we just do everything using the
>> MyCancelKey (which I think could just be called "SessionKey",
>> "SessionSecret", or even just "Session") as to ensure we have no case
>> of mistaken identity? Or does that end up being problematic?
>
> What if pid is unfortunately reused after passing the test of MyCancelKey
> and before sending the signal?

The way MyCancelKey is checked now is backwards, in my mind.  It seems
like it would be better checked by the receiving PID (one can use a
check/recheck also, if so inclined).  Is there a large caveat to that?
I'm working on a small patch to do this I hope to post soon (modulus
difficulties), but am fully aware that messing around PGPROC and
signal handling can be a bit fiddly.

-- 
fdr


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: pg_terminate_backend for same-role
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_terminate_backend for same-role