disabling foreign key when importing dump
After dumping the whole database with
pgdumpand try to execute the file, I found a lot of constrain being violated. This could be because the order of insertion does not match with schema foreign key.
To fix that, add this following statement to the beginning of the import file
SET session_replication_role = replica;