What about pg_size_unpretty()?
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных