<html theme="default-light" iconset="color"><head>
<meta http-equiv="Content-Type" content="text/html; 
charset=windows-1252">
</head><body text="#000000">I can't authoritatively speak to most of 
your questions, but...<br>
<br>
<span>Su Yu wrote on 1/20/22 3:02 PM:</span><br>
<blockquote type="cite" 
cite="mid:CP0P215MB1443641A1AC96461B4314915CC5A9@CP0P215MB1443.LAMP215.PROD.OUTLOOK.COM">
  <div><b>Question 2: Table has "auto increment" primary key.</b></div>

  <div>We have some use cases using sequence <span style="color: rgb(51,
 103, 145); font-family: monospace, monospace; font-size: 14.4px;">nextval </span>to
 generate incremental numbers as the primary keys for the table. And I 
have a concern about key collisions
 during migration. Because when we switch the application endpoint, we 
will have moments that application pods point to both old and new 
clusters. That might have a chance to create primary key collisions. Is 
this concern valid?</div>
</blockquote>
Yes, this is absolutely a concern. We have the same problem independent 
of RDS. Before you enter the transient switchover period when you are 
rolling with a real multi-master database, you'll want to tweak your 
sequences so that one db will only make even values and the other only 
odd values. (Or use different math if you have more than one potential 
source of ids, but the key is that you're going to need to make sure 
your sequences are set up to not make id conflicts.)<br>
<br>
After your migration, you can tweak your sequences to autoincrement by 1
 again (or whatever is appropriate for you).<br>
</body></html>