check_database_health
Analyze PostgreSQL database health by checking connections, cache performance, lock contention, replication status, disk usage, and transaction risks to identify issues and optimize performance.
Instructions
Perform a comprehensive database health check.
Note: This tool focuses on user/client tables and excludes PostgreSQL system tables (pg_catalog, information_schema, pg_toast) from analysis.
Analyzes multiple aspects of PostgreSQL health:
Connection statistics and pool usage
Cache hit ratios (buffer and index)
Lock contention and blocking queries
Replication status (if configured)
Transaction wraparound risk
Disk space usage
Background writer statistics
Checkpoint frequency
Returns a health score with detailed breakdown and recommendations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include_recommendations | No | Include actionable recommendations | |
| verbose | No | Include detailed statistics |