Replication and Binary Logging Options and Variables If the value of this variable is greater than 0, the MySQL server synchronizes its relay log to disk (using fdatasync() ) after every  sync_relay_log  events are written to the relay log. Setting this variable takes effect for all replication channels immediately, including running channels. Setting  sync_relay_log  to 0 causes no synchronization to be done to disk; in this case, the server relies on the operating system to flush the relay log’s contents from time to time as for any other file. A value of 1 is the safest choice because in the event of an unexpected halt you lose at most one event from the relay log. However, it is also the slowest choice (unless the disk has a battery-backed cache, which makes synchronization very fast). For information on the combination of settings on a replica that is most resilient to unexpected halts, see Section 17.4.2, “Handling an Unexpected Halt of a Replica” . Maximum Value 4294967295 Command-Line Format --sync-relay-log-info=# System Variable sync_relay_log_info Scope Global Dynamic Yes SET_VAR  Hint Applies No Type Integer Default Value 10000 Minimum Value 0 Maximum Value 4294967295 • sync_relay_log_info The number of transactions after which the replica updates the applier metadata repository. When the applier metadata repository is stored as an  InnoDB  table, which is the default from MySQL 8.0, it is updated after every transaction and this system variable is ignored. If the applier metadata repository is stored as a file, which is deprecated from MySQL 8.0, the replica synchronizes its  relay- log.info  file to disk (using  fdatasync() ) after this number of transactions. The default value for sync_relay_log_info  is 10000, and a zero value means that the file contents are only flushed by the operating system. Setting this variable takes effect for all replication channels immediately, including running channels. You can use the  mysqld  options and system variables that are described in this section to affect the operation of the binary log as well as to control which statements are written to the binary log. For additional information about the binary log, see Section 5.4.4, “The Binary Log” . For additional information about using MySQL server options and system variables, see Section 5.1.7, “Server Command Options” , and Section 5.1.8, “Server System Variables” . The following list describes startup options for enabling and configuring the binary log. System variables used with binary logging are discussed later in this section. • --binlog-row-event-max-size= N •Startup Options Used with Binary Logging •System Variables Used with Binary Logging 17.1.6.4 Binary Logging Options and Variables Startup Options Used with Binary Logging 3540