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 Answer
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
EXPERT
answered a year ago
  • 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.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions