Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

MySQL Delete Rows from Slave

$
0
0

I want to truncate the majority of data on a slave such that it only has the most recent records. I'll eventually demote the current master, making it a read-only archive, and promote the truncated slave to master. The primary motivation for truncation is reclamation of disk space; I want to dump and restore the slave.

Questions:

  1. Regarding the dump/restore operation on the slave, I'm planning on stopping the IO and SQL threads, then dumping the table, then dropping the table, the restoring from the dump, then starting the slave threads. Does this sound like the right process?

  2. What happens, after deleting rows from the slave, if the master sends an UPDATE or DELETE referencing a deleted row?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>