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:
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?
What happens, after deleting rows from the slave, if the master sends an
UPDATE
orDELETE
referencing a deleted row?