Assign foreign keys only after populating database
Option 1:
Use COPY from a valid dump of the tables in order to avoid any foreign key conflict (Copy is the fastest way i've found to load bulk data)

Option 2:
Create the schema without foreign keys, load the dumps, and recreate the foreign keys after that:
ALTER TABLE table2 DROP CONSTRAINT fkey;
ALTER TABLE table2 ADD CONSTRAINT  fkey; FOREIGN KEY (column_name) REFERENCES table1 (column_name);

Option 3: If you are in a production environment you can try a replication solution, check out how to create a stream replica from mongo to postgres.

Option 4: If you are just trying to migrate some subset or data and keep it sync you can use a connector.

For sure people here can help you with other approaches.