中继日志

中继日志来自Master的二进制日志, I / O线程从Master读取,然后写入本地的一类日志,类似于binary log。作为SQL线程的输入,中继日志中的事件将通过SQL线程来重演,从而实现复制。

The relay log consists of the events read from the binary log of the master and written by the slave I/O thread. Events in the relay log are executed on the slave as part of the SQL thread.

相关的参数:
mysql> show variables like '%relay%'; 
+-----------------------+----------------+ 
| Variable_name | Value | 
+-----------------------+----------------+ 
| max_relay_log_size | 0 | 
| relay_log | | 
| relay_log_index | | 
| relay_log_info_file | relay-log.info | 
| relay_log_purge | ON | 
| relay_log_recovery | OFF | 
| relay_log_space_limit | 0 | 
| sync_relay_log | 0 | 
| sync_relay_log_info | 0 | 
+-----------------------+----------------+

sync_relay_log
  • Description: The MariaDB server will synchronize its relay log to disk after this many writes to the log. The default until MariaDB 10.1.7 was 0, in which case the operating system handles flushing the file to disk. 1 is the safest, but slowest, choice, since the file is flushed after each write. If autocommit is enabled, there is one write per statement, otherwise there's one write per transaction. If the disk has cache backed by battery, synchronization will be fast and a more conservative number can be chosen.
  • Commandline: --sync-relay-log=#
  • Scope: Global
  • Dynamic: Yes
  • Data Type: numeric
  • Default Value: 10000 (>= MariaDB 10.1.7), 0 (<= MariaDB 10.1.6)
sync_relay_log_info和sync_relay_log类似
relay_log_purge
  • Description: If set to 1 (the default), relay logs will be purged as soon as they are no longer necessary.
  • Commandline: --relay-log-purge={0|1}
  • Scope: Global
  • Dynamic: Yes
  • Data Type: boolean
  • Default Value: ON

    完整的参数可以参考。
    https://mariadb.com/kb/en/library/replication-and-binary-log-server-system-variables/#relay_log_purge

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29497382/viewspace-2153357/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29497382/viewspace-2153357/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值