pgsize
Fast size viewer for PostgreSQL clusters (ncdu for pg).


Install
Using installation script
curl -fsSL https://raw.githubusercontent.com/hashmap-kz/pgsize/master/scripts/install.sh | sh
Using Go:
go install github.com/hashmap-kz/pgsize@latest
Using Homebrew:
brew tap hashmap-kz/homebrew-tap
brew install pgsize
Or download a binary from the Releases page.
Usage
# Using CLI flags
pgsize -dsn "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable"
pgsize -dsn "host=localhost port=5432 user=postgres password=$mypasswd"
# Using PG* env vars / libpq-style defaults
PGHOST=localhost PGPORT=5432 PGUSER=postgres PGPASSWORD=postgres PGDATABASE=postgres \
pgsize
# Connect to multiple clusters
pgsize \
--dsn "postgres://user:pass@dev:5432/db" \
--dsn "postgres://user:pass@stage:5432/db"
License
MIT. See LICENSE for details.