Blocking processes

Redgate Monitor shows current and past blocking on each PostgreSQL server: which sessions block others, and which sessions they block. You can see this in a table, then open a diagram of each blocking chain for more detail.

Blocking Processes table

You can find the Blocking processes table on the Server overview page. Each row is the head of a blocking chain, which is the session at the top that blocks the others. 

The table shows the blocking chains that Redgate Monitor saw during the time range selected in the graph at the top of the page. To see a different period, change the range in the graph. The table shows these columns:

  • PID
  • Blocking status
  • Status
  • Wait event type
  • Lock level
  • Lock type
  • Start time
  • End time
  • Total blocking time
  • Transaction age
  • User
  • Host
  • Query
  • Application
  • Process type
  • Database

One session can head more than one row. A row ends when the session stops blocking. If the session blocks again later, it starts a new row.

User, Host, Application and Database come from session activity data. Redgate Monitor collects that data less often than blocking data, so these columns can be empty for a session that only blocked briefly.

Prepared transactions

A prepared transaction (one that PREPARE TRANSACTION has prepared but nobody has committed or rolled back yet) keeps its locks after its session ends. It can block other sessions until someone commits it or rolls it back.

A prepared transaction has no process ID, so Redgate Monitor shows it like this:

  • The PID column shows its transaction ID.
  • The Process type column shows “Prepared transaction”.
  • Sessions that it blocks show “Blocked by prepared transaction” and the transaction ID in the Blocking status column.
  • User and Database show the user and database that prepared it.
  • Transaction age counts from when it was prepared.
  • Host, Application and Query are empty, because it has no client session.

Total blocking time

This is how long the session was part of this blocking chain. It starts when the session started to wait, or when another session started to wait on it, whichever came first. It ends at the last sample that saw the session in the chain.

Redgate Monitor samples blocking every 5 seconds, so the total can be up to 5 seconds shorter than the real blocking time.

If a chain started before the selected time range, its start time and total blocking time still count from when it really started. If the chain continued after the end of the range, its end time is the last sample in the range. To see how long the chain lasted in total, select a range that covers the whole chain.

How Redgate Monitor estimates wait start times on PostgreSQL 13 and earlier

PostgreSQL 14 and later record when a session starts to wait for a lock, and Redgate Monitor uses that time. PostgreSQL 13 and earlier don’t record it, so Redgate Monitor estimates it the first time it sees the session waiting. The estimate is the later of:

  • the start of the session’s current query
  • the time of the previous sample

A wait that the previous sample didn’t see must have started after that sample, and it can’t have started before the query that’s waiting.

The estimate doesn’t change while the session waits on the same lock. If the session starts a new query, Redgate Monitor treats it as a new wait and makes a new estimate.

Most estimates are no more than 5 seconds early. The exception is the first sample after Redgate Monitor starts to monitor the server, because there’s no previous sample yet. There, the estimate is the query start time. If a long-running query was already waiting, the total blocking time can be much longer than the real one.

Blocking process tree

Click a row in the Blocking processes table to open its blocking tree. The head blocker is the top node, highlighted in red. The sessions it blocks are its child nodes.

A blocked session can block other sessions too, so each child can have its own children. Each node shows details about its session, much like the columns in the table.

To see the same information as a table, use the Table view toggle at the top of the dialog.

This documentation contains proprietary information and is protected by copyright law.
Copyright © 2026 Red Gate Software Limited. All rights reserved


Didn't find what you were looking for?