feature: session manager #98

Open
opened 2026-07-15 17:49:04 -05:00 by noe.trevino · 0 comments
Owner

Did you check the docs?

  • I have read all the dadbod-ui.nvim docs

Something is running long, or blocking me, and i have no way to see what it is or stop it without leaving neovim.

Describe the solution you'd like

List the active sessions, kill one.

Each engine is one read query and one kill statement, which is the same shape as the adapter registry already:

Engine Read Kill
Postgres SELECT sa.* FROM pg_stat_activity sa pg_terminate_backend(pid) / pg_cancel_backend(pid)
MySQL SHOW FULL PROCESSLIST KILL QUERY <id> / KILL CONNECTION <id>
SQL Server sys.dm_exec_sessions + dm_exec_sql_text KILL <spid>
Oracle GV$SESSION joined to gv$sql ALTER SYSTEM KILL SESSION '<sid,serial#>'

Postgres and mysql each give you two verbs and i want both. Cancel the query but keep the connection, versus drop the connection entirely. Not the same action, shouldnt be the same keymap.

Acceptance Criteria

  • list active sessions
  • shows the sql each session is running
  • kill a session
  • cancel a running query without dropping the connection, where the engine supports it
  • confirms before killing
  • can refresh the list
  • keymaps are configurable
  • implemented in all adapters where their cli allows
    • postgres
    • MySQL
    • MariaDB
    • SQL Server
    • Oracle

Describe alternatives/other solutions you've considered

Telling people to write the select themselves. Its genuinely one query, but the kill flow and the refresh are what make it worth having, and nobody remembers the sql server one.

A lock and blocking manager instead, showing what is blocking what. More useful in the moment youd want it, and a lot more work. Postgres needs a big lock conflict CTE to work out who is waiting on who. Sessions first, that can come later.

### Did you check the docs? - [X] I have read all the dadbod-ui.nvim docs ### Is your feature request related to a problem? Please describe. Something is running long, or blocking me, and i have no way to see what it is or stop it without leaving neovim. ### Describe the solution you'd like List the active sessions, kill one. Each engine is one read query and one kill statement, which is the same shape as the adapter registry already: | Engine | Read | Kill | | --- | --- | --- | | Postgres | `SELECT sa.* FROM pg_stat_activity sa` | `pg_terminate_backend(pid)` / `pg_cancel_backend(pid)` | | MySQL | `SHOW FULL PROCESSLIST` | `KILL QUERY <id>` / `KILL CONNECTION <id>` | | SQL Server | `sys.dm_exec_sessions` + `dm_exec_sql_text` | `KILL <spid>` | | Oracle | `GV$SESSION` joined to `gv$sql` | `ALTER SYSTEM KILL SESSION '<sid,serial#>'` | Postgres and mysql each give you two verbs and i want both. Cancel the query but keep the connection, versus drop the connection entirely. Not the same action, shouldnt be the same keymap. ### Acceptance Criteria - [ ] list active sessions - [ ] shows the sql each session is running - [ ] kill a session - [ ] cancel a running query without dropping the connection, where the engine supports it - [ ] confirms before killing - [ ] can refresh the list - [ ] keymaps are configurable - [ ] implemented in all adapters where their cli allows - [ ] postgres - [ ] MySQL - [ ] MariaDB - [ ] SQL Server - [ ] Oracle ### Describe alternatives/other solutions you've considered Telling people to write the select themselves. Its genuinely one query, but the kill flow and the refresh are what make it worth having, and nobody remembers the sql server one. A lock and blocking manager instead, showing what is blocking what. More useful in the moment youd want it, and a lot more work. Postgres needs a big lock conflict CTE to work out who is waiting on who. Sessions first, that can come later.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
noe.trevino/dadbod-ui.nvim#98
No description provided.