문제

What is the significance of sync_binlog?

What exactly happens If I set sync_binlog=1?

How does it affect the replication between master and slave?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 dba.stackexchange
scroll top