Read PG stat IO
read_pg_stat_ioReads cumulative I/O statistics per backend, object, and context to identify buffer-cache misses and write amplification. Returns empty list on PostgreSQL 14/15 where the view is unavailable.
Instructions
Read the pg_stat_io view (PostgreSQL 16+). Reports per (backend_type, object, context) cumulative I/O activity — reads, writes, extends, evictions, hits, fsyncs. Useful for spotting buffer-cache misses and write amplification. On PostgreSQL 14 / 15 the view doesn't exist, so the tool returns available=false and an empty list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| available | Yes | ||
| server_version | Yes |