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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则