By using AWS re:Post, you agree to the Terms of Use

Refactoring from Oracle to postgres, Do I need to drop foreign key constraitns at postgres


I am doing reactoring from Oracle to Postgres, as part of it I am doing replication from Oracle to postgres using DMS. Do I need to drop foreign key on postgres before I start the DMS?

1 Answers

Best practice is to leave constraints off while doing the full load because they can cause errors. Once you are in the change data capture phase you can safely add them to the target database. Look at the "Working with indexes, triggers, and referential integrity constraints" section in the DMS Best Practices for more detail.

DMS doesn't migrate the constraints, so you don't need to drop them in the source database. You just need to not create them in the target database until you're ready. Look at the "Converting schema" section on the same page.

answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions