Copy postgis layer from S3 to Heroku
According to the link to a Heroku discussion here: Howto: Restore a single table to an existing database, the way your're doing it is always a destructive action.

A better solution proposed is to dump the table locally, and import the data remotely.

You could do a single dump of the table using a command like this:

pg_dump -U &lt;myuser&gt; &lt;mydb&gt; -t &lt;mytable&gt; -f &lt;my_table&gt;.sql 


And then try to restore it like this:

psql -U &lt;myuser&gt; &lt;mydb&gt; -h &lt;my_heroku_url&gt; -f &lt;my_table&gt;.sql


If you need a more intricate restore, I would recommend using pg_dump from the originating database with the -Fc flag, like this:

pg_dump -U &lt;myuser&gt; &lt;mydb&gt; -Fc -f &lt;my_db&gt;.dump


And then using the pg_restore utility to restore just the parts you need.

Further documentation for pg_restore is here: http://www.postgresql.org/docs/9.4/static/app-pgrestore.html

And for pg_dump: http://www.postgresql.org/docs/9.4/static/app-pgdump.html

Hope that helps. =)