Sizes
pg_sizesFind what takes up PostgreSQL storage by listing databases, schemas, tables, indexes, and tablespaces by size, with heap, index, and TOAST sizes shown separately.
Instructions
Find what takes the space: the biggest databases, schemas, tables (with heap data, indexes and TOAST shown separately), indexes or tablespaces, largest first.
scope selects the kind of object. schema narrows tables and indexes to one schema.
Partitions are listed as tables of their own. Sizes include all forks of each relation;
use pg_bloat to see how much of a table is wasted.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pg_sizes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| scope | No | tables | |
| schema | No | ||
| connection | No |