Postgres

List Postgres blocking queries

Changed on

This endpoint is in beta. API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns which queries waited on locks held by other queries on a Postgres service during the given time window. Each item groups one waiting query with one direct blocker, most-sampled first. Groups come only from periods when blocking query collection was on for the service; turn it on in the console. Results are paginated with limit/offset and include totalCount. The time range must not exceed 31 days, and to_date must be after from_date.

get/v1/organizations/{organizationId}/postgres/{postgresId}/blockingQueries

Request

  • Base URL
    https://api.clickhouse.cloud
  • Auth
    HTTP basic

Path parameters

organizationId, string uuid required

ID of the organization that owns the Postgres service.

postgresId, string uuid required
Example:f71df78e-ddad-82d0-8dfa-abbec741b82e

ID of the requested Postgres service.

Query parameters

from_date, string date-time required
Example:2026-03-26T00:00:00Z

Inclusive start of the time window (RFC 3339 date-time).

to_date, string date-time required
Example:2026-03-27T00:00:00Z

Inclusive end of the time window (RFC 3339 date-time).

db_name, string

Filter to groups whose waiting sessions used this database.

db_user, string

Filter to groups whose waiting sessions ran as this database user.

app, string

Filter to groups whose waiting sessions had this application_name. An empty value matches sessions with no application name.

limit, integer

Maximum number of results to return.

offset, integer

Number of results to skip before returning.

Response

Successful response

object required
status, number

HTTP status code.

requestId, string uuid

Unique id assigned to every request. UUIDv4

result, PostgresBlockingQuery[]

List of results.

Example response

{
  "status": 200,
  "result": [
    {
      "lockType": "transactionid",
      "blockedMode": "ShareLock",
      "latestBlockingState": "idle in transaction",
      "latestBlockingBackendType": "client backend",
      "lastSeen": "2026-04-22T14:06:00Z"
    }
  ]
}

Changes