get_io_stats
Analyze PostgreSQL I/O statistics to identify performance bottlenecks and buffer cache efficiency across database operations. Provides version-compatible insights for storage performance analysis.
Instructions
[Tool Purpose]: Analyze comprehensive I/O statistics across all database operations with version compatibility
[Exact Functionality]:
PostgreSQL 16+: Shows detailed I/O statistics from pg_stat_io (reads, writes, hits, timing)
PostgreSQL 12-15: Falls back to pg_statio_* views with basic I/O information
Provides buffer cache efficiency analysis and I/O timing when available
Identifies I/O patterns and performance bottlenecks
[Required Use Cases]:
When user requests "I/O stats", "I/O performance", "buffer cache analysis", etc.
When analyzing storage performance and buffer efficiency
When identifying I/O bottlenecks across different backend types
When comparing I/O patterns between relation types
[Strictly Prohibited Use Cases]:
Requests for I/O configuration changes or buffer tuning
Requests for storage or filesystem modifications
Requests for I/O statistics reset
Args: limit: Maximum number of results to return (1-100, default 20) database_name: Target database name (optional)
Returns: Comprehensive I/O statistics with version-appropriate detail level
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| database_name | No |