Skip to main content
Glama

PostgreSQL-Performance-Tuner-Mcp

get_bloat_summary

Analyze PostgreSQL database bloat to identify tables and indexes with wasted space, estimate reclaimable storage, and prioritize maintenance tasks for performance optimization.

Instructions

Get a comprehensive summary of database bloat across tables and indexes.

Note: This tool analyzes only user/client tables and indexes, excluding PostgreSQL system objects (pg_catalog, information_schema, pg_toast). This focuses the analysis on your application's custom objects.

Provides a high-level overview of:

  • Top bloated tables by wasted space

  • Top bloated indexes by estimated bloat

  • Total reclaimable space estimates

  • Priority maintenance recommendations

Uses pgstattuple_approx for tables (faster) and pgstatindex for B-tree indexes. Requires the pgstattuple extension to be installed.

Best for: Quick assessment of database bloat and maintenance priorities.

Input Schema

NameRequiredDescriptionDefault
schema_nameNoSchema to analyze (default: public)public
top_nNoNumber of top bloated objects to show (default: 10)
min_size_gbNoMinimum object size in GB to include (default: 5)

Input Schema (JSON Schema)

{ "properties": { "min_size_gb": { "default": 5, "description": "Minimum object size in GB to include (default: 5)", "type": "number" }, "schema_name": { "default": "public", "description": "Schema to analyze (default: public)", "type": "string" }, "top_n": { "default": 10, "description": "Number of top bloated objects to show (default: 10)", "type": "integer" } }, "required": [], "type": "object" }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/isdaniel/pgtuner-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server