pg_terminate_backend for same-role - Mailing list pgsql-hackers

From Daniel Farina
Subject pg_terminate_backend for same-role
Date
Msg-id CAAZKuFYNy4GAehTf-H-bfpodbbPX1BrfAod0UOarcUESLouvXg@mail.gmail.com
Whole thread Raw
Responses Re: pg_terminate_backend for same-role  (Fujii Masao <masao.fujii@gmail.com>)
Re: pg_terminate_backend for same-role  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
Parallel to pg_cancel_backend, it'd be nice to allow the user to just
outright kill a backend that they own (politely, with a SIGTERM),
aborting any transactions in progress, including the idle transaction,
and closing the socket.

I imagine the problem is a race condition whereby a pid might be
reused by another process owned by another user (doesn't that also
affect pg_cancel_backend?).  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?

-- 
fdr


pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: Command Triggers, v16
Next
From: Tareq Aljabban
Date:
Subject: Re: Storage Manager crash at mdwrite()