Query Insights

List live non-idle backends

Real-time snapshot of the non-idle backends on the instance database, from pg_stat_activity (core view; needs no pg_stat_statements). Complements slow-queries (historical/aggregate): for live incidents — lock chains (blocked_by/is_blocked via pg_blocking_pids), long-open transactions, idle-in-transaction holders (where query is the last statement, not a running one), and connection saturation (connection_summary). Rows are tenant-scoped by datname; plain-idle pooled connections are counted in the summary but omitted from the list; parallel workers fold into their leader. Query text is redacted of literals. Read-only (READ ONLY transaction as the least-privilege cloudpepper_insights role, statement/lock timeouts); diagnostic only — it does not cancel/terminate. Out-of-range min_duration_ms/limit are clamped. Hosts without query insights enabled return HTTP 409 with a machine-readable reason.

Key Parameters:

  • id: The instance whose database to inspect
  • min_duration_ms: Floor on how long a backend has been running/stuck
  • limit: How many to return (longest first)
get/instances/{id}/running-statements

Request

  • Base URL: https://api.cloudpepper.io
  • URL: https://api.cloudpepper.io/instances/{id}/running-statements
  • Auth: HTTP bearer

Response

Running statements retrieved successfully

object required

Changes

No recorded changes to this operation across all 1 revision of this API.