title: How do I rename the default postgres superuser to "root"?
body: <p>I currently log in to PostgreSQL using <code>psql -U postgres</code>. How do I rename <code>postgres</code> user to <code>root</code>?</p>
  
  <p>If I am already logged in as <code>postgres</code> then trying <code>ALTER USER postgres RENAME TO root</code> will say <code>ERROR:  session user cannot be renamed</code>.</p>
  
  <p>Is it possible to rename the user without logging as <code>postgres</code> user? I don't think I have any other superuser since this is a fresh install of PostgreSQL.</p>
  
  <p>By the way, I am running Gentoo on Amazon EC2.</p>