title: why is my postgres database so big?
body: <p>i'm running PostgreSQL 9.4.6 and I have a database that's 78GB found by running </p>
  
  <pre><code>SELECT pg_size_pretty(pg_database_size('&lt;db name&gt;')) As fulldbsize;
  </code></pre>
  
  <p>In order to track down why my database is so big I've tried the following:-</p>
  
  <pre><code>SELECT relname as "Table",      
         pg_size_pretty(pg_total_relation_size(relid)) As "Size",
         pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size" 
  FROM pg_catalog.pg_statio_user_tables 
  ORDER BY pg_total_relation_size(relid) DESC;
  </code></pre>
  
  <p>But when adding up the resulting tables I get to about 15GB.</p>
  
  <p>What's using my up the space in my database?  What further commands can I run?</p>