I need to clear disk space, so I want to see which tables and other objects are using the most disk space in my Postgres databases.
Ideally, I'd like to see: database name, schema name, object type, object name and size in GB/MB. I'm imagining something like the du -h
command or the ncdu
utility but for Postgres.
Is there a command to do this in psql
? I know about \l+ {database name}
but this just gives me the size of the database, not the objects within it.