Server activity and blocking queries
See what a PostgreSQL server is doing right now in RowDex: running sessions, wait states, durations, blocking queries, and cancel or terminate a session.
When the database feels slow, the first question is what is it doing? The server activity panel answers it with a live table of sessions.
Screenshot placeholder
The Server activity panel listing sessions with PID, user, state, wait, duration and query, with one blocked row highlighted.
public/docs/server-activity.pngOpen it#
Click the Server activity button in the sidebar toolbar while connected to PostgreSQL.
Read the table#
| Column | Meaning |
|---|---|
| PID | The server process for the session. |
| User, Application, Database | Who is connected, from which app, to which database. |
| State | Whether it is running a query, idle, or idle in a transaction. |
| Wait | What the session is waiting on, if anything. |
| Duration | How long it has been in its current state. |
| Query | The statement it is running or last ran. Hover for the full text. |
- Hide idle shows only sessions that are doing something.
- This database only limits the list to the database you are connected to.
- Pause and Resume stop and restart the live refresh while you read.
Find what is blocking what#
A session that is waiting on another session's lock is marked as blocked, with the PID that holds the lock, and the session causing the pile-up is marked as a blocker. An idle in transaction session is a classic culprit: it holds locks while doing nothing.
Cancel or terminate#
| Action | Effect |
|---|---|
| Cancel | Stops the running query. The session stays connected. |
| Terminate | Closes the whole connection. |
Was this page helpful?