Would it be possible to make some kind of change in a mysql replica in rds?

0

I have a mysql 5.7 replica on RDS and I would like to know if I could make any changes.

For some replica tables, I need to remove the foreign keys and partition it. I need to do this, because the replica is used to receive Select queries and due to the enormous size of some tables, partitioning would help to considerably improve the performance of these queries.

Could I do this without breaking the replica's sync?

  • Are you referring to Read Replicas?

  • Yes, read replicas

rgouvea
已提問 1 年前檢視次數 221 次
1 個回答
0

As long as the changes you make do not affect the compatibility of the replica with its primary, you can make changes to the replica.

See "Updating read replicas with MySQL" under https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_MySQL.Replication.ReadReplicas.html: "Read replicas are designed to support read queries, but you might need occasional updates. For example, you might need to add an index to optimize the specific types of queries accessing the replica. You can enable updates by setting the read_only parameter to 0 in the DB parameter group for the read replica. Be careful when disabling read-only on a read replica because it can cause problems if the read replica becomes incompatible with the source DB instance. Change the value of the read_only parameter back to 1 as soon as possible. "

profile pictureAWS
專家
已回答 1 年前
  • I understand, but going back to read-only 1, I lose what was done, that is, what I did stops working or continues to work?

  • Govardhanan_R is correct, you only need turn off read only in order to make the schema change. If you've not made any breaking changes to the schema that effect replication you can (optionally) flip back to read only.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南