Is disabling triggers to disable foreign key constraints a good idea?
You can create the foreign key constraints with the option NOT VALID. Then they are declared, but are not enforced:

create table parent (id integer primary key);
create table child (id integer primary key, pid integer);

insert into parent values (1),(2),(3);
insert into child values (1,100),(2,200),(3,300); --&lt;&lt; invalid pid values!

alter table child 
     add constraint fk_child_parent 
     foreign key (pid) references p (id) NOT VALID; --&lt;&lt; succeeds