title: pg_restore --clean is not dropping and clearing the database
body: <p>I am having an issue with pg_restore --clean not clearing the database.</p>
  
  <p>Or do I misunderstand what the --clean does, I am expecting it to truncate the database tables and reinitialize the indexes/primary keys.</p>
  
  <p>I am using 9.5 on rds</p>
  
  <p>This is the full command we use</p>
  
  <pre class="lang-none prettyprint-override"><code>pg_restore --verbose --clean --no-acl --no-owner -h localhost -U superuser -d mydatabase backup.dump
  </code></pre>
  
  <p>Basically what is happening is this.</p>
  
  <p>I do a nightly backup of my production db, and restore it to an analytics db for the analyst to churn and run their reports.</p>
  
  <p>I found out recently that the rails application used to view the reports was complaining that the primary keys were missing from the restored analytics database.</p>
  
  <p>So I started investigating the production db, the analytics db etc. Which was when I realized that multiple rows with the same primary key existed in the analytics database.</p>
  
  <p>I ran a few short experiments and realized that every time the pg_restore script is run it inserts duplicate data into the tables, this leads me to think that the --clean is not dropping and restoring the data. Because if I were to drop the schema beforehand, I don't get duplicate data.</p>