Monitor connections and locks
Connections shows database sessions, their states and query text. Locks shows acquired and waiting locks, including the session that blocks a wait when the database supplies it.
Monitor connections and locks
Section titled “Monitor connections and locks”- Open Admin › Connections.
- Use the search field or state filter to narrow the list.
- Select a session to open Connection Details.
- Check its PID, user, database, state and query.
The details also show duration, wait information and the client application when available. TableAI identifies its own sessions and warns when the selected session is your main query connection.
Use the shared refresh controls to watch activity over time.

Find a blocking session
Section titled “Find a blocking session”- Open Admin › Locks.
- Select Waiting only to focus on blocked work.
- Find the waiting lock’s PID and Blocked By value.
- Inspect that blocking PID in Connections.
- Check the blocking session’s owner and transaction before deciding what to stop.
Granted means the session holds the lock. Waiting means it has not acquired it. A granted lock alone does not mean that it blocks another session.
Cancel a query or end a session
Section titled “Cancel a query or end a session”Choose the action according to what you intend to stop:
| Action | Effect |
|---|---|
| Cancel Query | Stops the active query and leaves the connection open. |
| Kill Connection | Ends the session and rolls back its active transaction. |
- Select the target session in Connections.
- Choose the available Cancel Query or Kill Connection action.
- Check the PID and effect in the confirmation dialog.
- Enter the connection password if requested.
- Confirm the selected action.
- Refresh the list to check the result.
Check the session owner and PID before confirming. Kill Connection discards uncommitted work. Ending your main query connection also disconnects TableAI from the database.
Safe Mode blocks these actions for active sessions. The confirmation dialog explains any protection or permission that prevents the action. See query guardrails for connection protection settings.
Database differences
Section titled “Database differences”| Database | Monitoring details |
|---|---|
| PostgreSQL | Sessions include state and wait information; lock details identify blocking PIDs. |
| MySQL | Sessions come from the process list; lock monitoring reads performance_schema. |
| MariaDB | Session monitoring uses the process list; lock monitoring uses MariaDB InnoDB metadata. |
| Amazon Redshift | Session and lock information comes from Redshift system metadata. |
For access requirements, see admin data unavailable.
Related
Section titled “Related”- SQL instructions: PostgreSQL view locks and cancel or kill a query; MySQL view locks and cancel or kill a query; MariaDB view locks.
- Database errors: PostgreSQL 40P01 and 53300; MySQL 1213.
- Learn about deadlocks, or continue with slow queries and indexes.