title: cannot import new database from pg_dump, out of memory. psql cloned_db < db_backup.sql
body: <p>made a backup of a remote database by the following </p>
  
  <pre><code>pg_dump dbname | gzip &gt; filename.gz
  </code></pre>
  
  <p>made a new database that i want to import it to </p>
  
  <pre><code>CREATE DATABASE new_clone;
  </code></pre>
  
  <p>tried importing into new database by the following command:</p>
  
  <pre><code>gunzip -c /path/to/backup/filename.sql.gz | psql new_clone
  </code></pre>
  
  <p>working, imported parts of the database, but ran into error</p>
  
  <pre><code>out of memory
  </code></pre>
  
  <p>no other information... most tables and schemas have appeared, but I cannot get past this problem.</p>
  
  <p>ive tried doing a simple</p>
  
  <pre><code>pg_dump dbname &gt; filename
  </code></pre>
  
  <p>and a </p>
  
  <pre><code>psql dbname &lt; infile
  </code></pre>
  
  <p>tried without compression, and it fails as well. 
  my guess is that a blob inside the database is too large? is there a way to skip the blobs that cause errors?</p>
  
  <p>database size is 10GB uncompressed, 2.2GB compressed. i have 135GB free disk space, and 32GB ram. running ubuntu 14.04, postgres v 9.6.2</p>
  
  <p>appreciate any help at all. thanks. </p>