Read more

PostgreSQL: Show size of all databases

Thomas Eisenbarth
January 14, 2016Software engineer at makandra GmbH

Use this:

SELECT pg_database.datname as "database_name", pg_database_size(pg_database.datname)/1024/1024 AS size_in_mb FROM pg_database ORDER by size_in_mb DESC;
Illustration money motivation

Opscomplete powered by makandra brand

Save money by migrating from AWS to our fully managed hosting in Germany.

  • Trusted by over 100 customers
  • Ready to use with Ruby, Node.js, PHP
  • Proactive management by operations experts
Read more Show snapshot

Want to see database sizes in MySQL ?

Posted by Thomas Eisenbarth to makandra dev (2016-01-14 15:52)