سؤال

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