I have 2 database clusters that operate independently. In the future, I may need to move the records for a customer from cluster 1 to 2. I have a bash script where I do server-side copying of the table records into CSV files from cluster 1 and then restore them into cluster 2.
The associations between data use sequential IDs. These IDs are not unique across the two instances. It seems that there are two possibilities:
I am not using the best tools for my use-case. There exists other tools that permits me to do this with much less hassle. I have glossed over foreign data wrappers. I do not want to do a dump because I only need some records.
I need to just suck it up and use UUIDs that are unique across my dataset.