pg_terminate_backend for same-role

From: Daniel Farina <daniel(at)heroku(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_terminate_backend for same-role
Date: 2012-03-15 23:14:03
Message-ID: CAAZKuFYNy4GAehTf-H-bfpodbbPX1BrfAod0UOarcUESLouvXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tareq Aljabban 2012-03-15 23:36:23 Re: Storage Manager crash at mdwrite()
Previous Message Thom Brown 2012-03-15 22:41:21 Re: Command Triggers, v16