PostgreSQL merging identical tables from separate databases into single database
Your method is easily improved, however you're mostly there.

When you run this



pg_dump [OLD_DATABASE] --schema-only &gt; dbschema.sql


Instead do

pg_dump [OLD_DATABASE] --schema-only --section pre-data &gt; pre.sql


Then load your dumped data, produced by this (from all the servers)

pg_dump [OLD_DATABASES] --disable-triggers --data-only --inserts &gt; old_db_data.sql


But, then you need to add the add the constraints.. So go back to your original database and run

pg_dump [OLD_DATABASE] --schema-only --section post-data &gt; post.sql


And, then load post.sql. This will add the constraints.