Fast size viewer for PostgreSQL clusters (ncdu for pg).
Using installation script
curl -fsSL https://raw.githubusercontent.com/hashmap-kz/pgsize/master/scripts/install.sh | shUsing Go:
go install github.com/hashmap-kz/pgsize@latestUsing Homebrew:
brew tap hashmap-kz/homebrew-tap
brew install pgsizeOr download a binary from the Releases page.
# 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"MIT. See LICENSE for details.
