task: transfer and update data from mysql to postgres, advise best practices for implementation.
options:

  1. drop the tables and do constantly insert data
  2. implement the logic to check whether some records have been updated, update them, and new ones, perhaps there are pitfalls.

What can you advise?

  • well, it all depends on where your data comes from in mysql and whether it is needed there. And maybe then it would be easier to immediately insert into the postgress, instead of mysql - Mike
  • you need to transfer all tables to postgres and update data with periodicity - MPyt
  • Are you planning to change the table structure in the future? - cheops
  • new fields can be added - MPyt
  • one
    @MPyt There is a third way - the free product oracle golden gate. It takes a couple of days to get serious about it ... He can replicate any data between any DBMS on the fly. And drop / insert is a rather dangerous event. You can start transferring data while you read another process, insert data, you will not see it and drop the table. So it's safer all the same to select for update and delete exactly the transferred lines - Mike

0