HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Are relay logs necessary for replication?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
necessarylogsarereplicationforrelay

Problem

I'm trying to understand when/where using relay log is beneficial. According the documentation, mysql captures and writes events from the master's binary log as the result of the I/O thread. Then, the SQL thread executes the statements from the slave relay log.

Currently, I have the relay logs disabled on the slave but it hasn't affected replication. It still performs well.

If replication requires the SQL thread to read statements from the relay log so they can be executed, why is it still working without a relay log?

Thanks

Solution

Replication does require relay logs. IF you have a replicating slave then it does use relay logs, and you have not disabled them. Please check the following:

SHOW SLAVE STATUS \G


Do you have Slave_IO_Running: Yes? Then your replication seems to be running. Please look for the Relay_Log_File column - what does it say? It should point out the current relay log file.

Look for this file. It should be by default on your @@datadir. Is it there? There's your replication relay logs.

You say you've disabled the relay logs -- I suggest you haven't (I don't even recall there's a way to disable the relay logs). How in your opinion have you disabled the relay logs?

Code Snippets

SHOW SLAVE STATUS \G

Context

StackExchange Database Administrators Q#63972, answer score: 5

Revisions (0)

No revisions yet.