Skip to content

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.

  1. Open Admin › Connections.
  2. Use the search field or state filter to narrow the list.
  3. Select a session to open Connection Details.
  4. 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.

Connections list with a selected demo session and its PID, state, query and action buttons
  1. Open Admin › Locks.
  2. Select Waiting only to focus on blocked work.
  3. Find the waiting lock’s PID and Blocked By value.
  4. Inspect that blocking PID in Connections.
  5. 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.

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.
  1. Select the target session in Connections.
  2. Choose the available Cancel Query or Kill Connection action.
  3. Check the PID and effect in the confirmation dialog.
  4. Enter the connection password if requested.
  5. Confirm the selected action.
  6. Refresh the list to check the result.

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 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.