get_wait_events
List PostgreSQL wait event types with descriptions from pg_wait_events and correlate them with active sessions currently waiting, helping diagnose session waits and wait patterns.
Instructions
[Tool Purpose]: List available wait event types and their descriptions (PostgreSQL 17+)
[Exact Functionality]:
Show all wait event types with human-readable descriptions from pg_wait_events catalog
Correlate with current active sessions waiting on events
Filter by specific wait event type
Falls back to basic pg_stat_activity wait info on PG < 17
[Required Use Cases]:
When user requests "wait events", "wait event descriptions", "what are sessions waiting on"
When diagnosing session waits and understanding wait event meanings
When analyzing wait patterns across the database
[Strictly Prohibited Use Cases]:
Requests for session termination or wait resolution
Requests for configuration changes
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_name | No | Database name to analyze (uses default if omitted) | |
| wait_event_type | No | Filter by wait event type (e.g., "Lock", "IO", "LWLock") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |