---
title: "Postgres wait events, now in Query Insights"
description: "Query Insights for ClickHouse Managed Postgres now includes wait event metrics that show what active sessions are waiting on, such as disk I/O, locks, or CPU. The Active sessions by wait type chart groups activity by wait_event_type, with categories like IO, Lock, and CPU, where CPU means a session is active with no reported wait event. A Waits table breaks down individual wait_event values, showing their average active sessions and share of total load; in the example, lock waits account for about 42% of load. Two additional charts, Blocked sessions and Lock wait time, display the number of sessions waiting on locks and the p50, p95, and maximum wait durations, with maximum lock waits repeatedly above 100 seconds. Wait event metrics are also available through the Managed Postgres Prometheus endpoint for custom Grafana dashboards and alerting, and ClickHouse Agents can help investigate wait events alongside slow queries."
---

# Postgres wait events, now in Query Insights

[Clickhouse](https://yomu.fyi/company/clickhouse) · Oct 19, 2026

**Type:** Announcement

## Summary

Query Insights for ClickHouse Managed Postgres now includes wait event metrics that show what active sessions are waiting on, such as disk I/O, locks, or CPU. The Active sessions by wait type chart groups activity by wait\_event\_type, with categories like IO, Lock, and CPU, where CPU means a session is active with no reported wait event. A Waits table breaks down individual wait\_event values, showing their average active sessions and share of total load; in the example, lock waits account for about 42% of load. Two additional charts, Blocked sessions and Lock wait time, display the number of sessions waiting on locks and the p50, p95, and maximum wait durations, with maximum lock waits repeatedly above 100 seconds. Wait event metrics are also available through the Managed Postgres Prometheus endpoint for custom Grafana dashboards and alerting, and ClickHouse Agents can help investigate wait events alongside slow queries.

## Context

Query Insights previously showed expensive queries and resource metrics like CPU, reads, and writes, but lacked visibility into what sessions were waiting on, such as locks or I/O. The new wait event metrics fill that gap.

## Approach / What changed

The new wait event metrics include an Active sessions by wait type chart that groups activity by wait\_event\_type, a Waits table with individual wait\_event values and their share of load, Blocked sessions and Lock wait time charts showing number of blocked sessions and wait durations, and Prometheus metrics for wait events and lock wait time.

## Takeaways

- Wait event metrics in Query Insights show the average number of active sessions per wait category and each category’s share of total load, helping identify whether the database is waiting on I/O, locks, or CPU.
- Lock contention can be analyzed with Blocked sessions and Lock wait time charts, which display the number of sessions waiting on locks and the p50, p95, and maximum lock wait durations.
- Wait event metrics are available through the Managed Postgres Prometheus endpoint, allowing custom Grafana dashboards and alerting on persistent lock contention.

## FAQ

### What does CPU mean in the wait type chart?

CPU means a session is active with no reported wait event; it is not a direct measurement of CPU utilization.

### How can I see which specific events are driving lock waits?

Hover over a bar in the Active sessions by wait type chart to see specific events, or click the card to open the Waits table with individual wait\_event values and their share of total load.

### Can I monitor wait events in Prometheus?

Yes, wait events are available through the Managed Postgres Prometheus endpoint, allowing you to graph active sessions by wait event and maximum lock wait time in Grafana and set up alerts.

**Tags:** [Managed Postgres](https://yomu.fyi/topic/managed-postgres), [Observability](https://yomu.fyi/topic/observability), [Postgres](https://yomu.fyi/topic/postgres), [Query Insights](https://yomu.fyi/topic/query-insights)

- Source: [Clickhouse](https://clickhouse.com/blog/postgres-wait-events-query-insights)
- Source URL: https://clickhouse.com/blog/postgres-wait-events-query-insights
- Ingested by Yomu: 2026-10-19T12:00:13.309Z

[Read original post](https://clickhouse.com/blog/postgres-wait-events-query-insights)
