patternsqlMinor
What is the significance of sync_binlog?
Viewed 0 times
significancethesync_binlogwhat
Problem
What is the significance of
What exactly happens If I set
How does it affect the replication between master and slave?
sync_binlog?What exactly happens If I set
sync_binlog=1?How does it affect the replication between master and slave?
Solution
Turning it on flushes binlog events to disk. This costs some extra I/O.
Turning it off lets the events eventually go to disk. If the one of the servers crashes, the Slave can be in an "impossible" position in the replication stream. The 'fix' is to move its pointer to the beginning of the next binlog on the Master.
Recommend you turn it on. If you are overloaded on I/O, then look around for other remedies, such as improving the worst query in the slowlog.
Turning it off lets the events eventually go to disk. If the one of the servers crashes, the Slave can be in an "impossible" position in the replication stream. The 'fix' is to move its pointer to the beginning of the next binlog on the Master.
Recommend you turn it on. If you are overloaded on I/O, then look around for other remedies, such as improving the worst query in the slowlog.
Context
StackExchange Database Administrators Q#184877, answer score: 8
Revisions (0)
No revisions yet.