title: Serial column takes up disproportional amount of space in PostgreSQL
body: <p>I would like to create an auto-incrementing <code>id</code> column that is <strong>not a primary key</strong> in a PostgreSQL table.  The table is currently just over 200M rows and contains 14 columns.</p>
  <pre><code>SELECT pg_size_pretty(pg_total_relation_size('mytable'));
  </code></pre>
  <p>The above query reveals that <code>mytable</code> takes up <strong>57 GB</strong> on disk.  I currently have 30 GB free space remaining on disk after checking with <code>df -h</code> (on Ubuntu 20.04)</p>
  <p>What I don't understand is why, after trying to create a <code>SERIAL</code> column, I completely run out of disk space - the query ends up never finishing.  I run the following command:</p>
  <pre><code>ALTER TABLE mytable ADD COLUMN id SERIAL;
  </code></pre>
  <p>and then see how gradually, my disk space runs out until there is nothing left and the query fails. I am no database expert but it does not make sense. Why would a simple serialized column take up more than half of the space of the table itself, especially when it is not a primary key and therefore has no index?  Is there a known workaround to creating such an auto-incrementing id column?</p>