溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

精致的參數(shù) - max_binlog_files

發(fā)布時(shí)間:2020-03-02 04:12:51 來(lái)源:網(wǎng)絡(luò) 閱讀:691 作者:coveringindex 欄目:MySQL數(shù)據(jù)庫(kù)

max_binlog_files,是Percona MySQL分支提供的限制binlog文件數(shù)量的參數(shù),在刪除歸檔數(shù)據(jù)、binlog增長(zhǎng)很快的情況下,很實(shí)用的一個(gè)參數(shù)。


該參數(shù)也對(duì)正在被使用的binlog提供了保護(hù),是purge不掉的,如下。



[root@mysql.sock][(none)]>purge binary logs to 'bin.016222';

Query OK, 0 rows affected, 1 warning (0.01 sec)


[root@mysql.sock][(none)]>>show warnings;

+---------+------+------------------------------------------------------------------------------------------------------+

| Level? ?| Code | Message? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |

+---------+------+------------------------------------------------------------------------------------------------------+

| Warning | 1867 | file ./bin.016215 was not purged because it was being read by 1 thread(s), purged only 0 out of 7 files. |

+---------+------+------------------------------------------------------------------------------------------------------+

1 row in set (0.00 sec)


$ perror 1867

MySQL error code 1867 (ER_WARN_PURGE_LOG_IN_USE): file %s was not purged because it was being read by %d thread(s), purged only %d out of %d files.


error日志中也是用體現(xiàn)的。


2019-09-18T01:02:56.643574+08:00 10326541 [Warning] file ./bin.016215 was not purged because it was being readby thread number 17218543

2019-09-18T01:03:18.196285+08:00 17244031 [Warning] file ./bin.016215 was not purged because it was being readby thread number 17218543


向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI