Two new commands: `activity` and `terminate [PID]` (was: the "cancel" command)
Goal
Users need to be able to cancel a particular command.
TODO / How to implement
The user sends cancel
word, replying to a particular command, and this command gets canceled (using pg_terminate_backend(...)
).
Technically, we need to understand how to determine pid
of the given command. If it seems too complicated, an alternative implementation would be:
- allow seeing the content of
pg_stat_activity
/pg_locks
, withpid
values, -
cancel [pid]
(orterminate [pid]
?) interrupts processing of particular query.
Details:
-
EE (detached) #125 (closed) -
activity
:select fr om pg_stat_activity ...
(TBD -- @NikolayS) + doc + help6️⃣ -
terminate PID
:select pg_terminate_backend(pid);
+ doc + help3️⃣ -
blog post (detached) (https://gitlab.com/postgres-ai/frontend/-/issues/34)
Acceptance criteria
As a user, I'm able to cancel any request at any time without difficulties.
Edited by Artyom Kartasov