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

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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ