binlog_expire_logs_seconds

In 10.6 ES:

If non-zero, binary logs will be purged after binlog_expire_logs_seconds seconds; It and expire_logs_days are linked, such that changes in one are converted into the other. Possible purges happen at startup and at binary log rotation.

In 10.5 ES, 10.4 ES:

Not present

See also: System Variables for MariaDB Enterprise Server 10.6, in 10.5 ES, and in 10.4 ES

DETAILS

The binlog_expire_logs_seconds system variable can be used to configure the binlog expiration period with a temporal resolution of 1 second.

In versions with the binlog_expire_logs_seconds system variable, the expire_logs_days system variable is linked to the binlog_expire_logs_seconds system variable:

  • When the binlog_expire_logs_seconds system variable is set, the specified value in seconds is converted to the corresponding number of days, and the resulting floating point value is set to the expire_logs_days system variable.

  • When the expire_logs_days system variable is set, the specified value in days is converted to the corresponding number of seconds, and the resulting integer value is set to the binlog_expire_logs_seconds system variable.

Prior to this feature, the expire_logs_days system variable only supported integer values, so the binary log expiration period could only have a temporal resolution of 1 day.

PARAMETERS

Dynamic

Yes

Scope

Global

Data Type

BIGINT UNSIGNED

Minimum Value

0

Maximum Value

8553600

Default Value

0

SKYSQL

Cloud

SkySQL Topology

ES Ver

Default

AWS

HA (Primary/Replica)

10.4

Not present

AWS

HA (Primary/Replica)

10.5

Not present

AWS

Transactional Standalone

10.4

Not present

AWS

Transactional Standalone

10.5

Not present

AWS

Distributed Transactions

10.5

Not present

GCP

ColumnStore

10.5

Not present

GCP

ColumnStore Multi

10.5

Not present

GCP

Galera

10.4

Not present

GCP

Galera

10.5

Not present

GCP

HA (Primary/Replica)

10.4

Not present

GCP

HA (Primary/Replica)

10.5

Not present

GCP

HTAP

10.5

Not present

GCP

Transactional Standalone

10.4

Not present

GCP

Transactional Standalone

10.5

Not present

GCP

Distributed Transactions

10.5

Not present

EXAMPLES

SET GLOBAL binlog_expire_logs_seconds = 43200;
SHOW VARIABLES LIKE '%expire_logs%';
+----------------------------+----------+
| Variable_name              | Value    |
+----------------------------+----------+
| binlog_expire_logs_seconds | 43200    |
| expire_logs_days           | 0.500000 |
+----------------------------+----------+
SET GLOBAL expire_logs_days = 10;
SHOW VARIABLES LIKE '%expire_logs%';
+----------------------------+-----------+
| Variable_name              | Value     |
+----------------------------+-----------+
| binlog_expire_logs_seconds | 864000    |
| expire_logs_days           | 10.000000 |
+----------------------------+-----------+

CHANGE HISTORY

Release Series

History

10.6 Enterprise

  • Added in MariaDB Enterprise Server 10.6.4-1.

10.5 Enterprise

  • Not present.

10.4 Enterprise

  • Not present.

EXTERNAL REFERENCES