Skip to content

Instantly share code, notes, and snippets.

@hanula
Created December 19, 2024 09:14
Show Gist options
  • Save hanula/df9b98e8e549056232f5b1771fd5b4e1 to your computer and use it in GitHub Desktop.
Save hanula/df9b98e8e549056232f5b1771fd5b4e1 to your computer and use it in GitHub Desktop.
Heroku DB size and version summary
#!/bin/bash
heroku pg:info --app $MY_APP \
| sed -e 's/[\(\)]//g' \
| awk '/^=== /{db=$2} /^Data Size: /{size=$8} /^PG Version: /{version=$3} /^$/{printf("%-32s PG=%-8s size=%-10s\n", db, version, size)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment