Anyway, I suspect your idea will work, but if you're going to the trouble of disabling+reenabling triggers for performance reasons, you might still be better off with pg_restore, since it can handle creation of constraints and indexes at the appropriate time as well, which can really help.