You can try one option, although just a thought in the air 😊
Use postgres FDW ex. https://robots.thoughtbot.com/postgres-foreign-data-wrapper
Create foreign tables in the relevant server schema
And then union/union all 😊 or your custom constraint on the destination table where you dump the rows.
For ex.
You have server1, server2, server3
And you have server4 as your new single server.
You create FDW of server1, server2, server3 on server 4 and then import table into respective server schema.
server1.table1, server2.table1, server3.table1
and then
insert into server4.table1 select * from( select * from server1.table1 union select * from server2.table1 union select * from server3.table1) a;
something 😊
Thanks,
Vijay
From: Alex O'Ree <spyhunter99@gmail.com>
Date: Wednesday, June 13, 2018 at 4:47 PM
To: "pgsql-general@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
Subject: [External] Merging two database dumps