Replication and Binary Log Status Variables

The terms master and slave have historically been used in replication, but the terms terms primary and replica are now preferred. The old terms are used throughout the documentation, and in MariaDB commands, although MariaDB 10.5 has begun the process of renaming. The documentation will follow over time. See MDEV-18777 to follow progress on this effort.

The following status variables are useful in binary logging and replication. See Server Status Variables for a complete list of status variables that can be viewed with SHOW STATUS.

See also the Full list of MariaDB options, system and status variables.

Binlog_bytes_written

  • Description: The number of bytes written to the binary log.
  • Scope: Global
  • Data Type: numeric

Binlog_cache_disk_use

  • Description: Number of transactions which used a temporary disk cache because they could not fit in the regular binary log cache, being larger than binlog_cache_size. The global value can be flushed by FLUSH STATUS.
  • Scope: Global
  • Data Type: numeric

Binlog_cache_use

  • Description: Number of transaction which used the regular binary log cache, being smaller than binlog_cache_size. The global value can be flushed by FLUSH STATUS.
  • Scope: Global
  • Data Type: numeric

Binlog_commits

  • Description: Total number of transactions committed to the binary log.
  • Scope: Global
  • Data Type: numeric

Binlog_group_commit_trigger_count


Binlog_group_commit_trigger_lock_wait

  • Description: Total number of group commits triggered because a binary log commit was being delayed because of a lock wait where the lock was held by a prior binary log commit. When this happens the later binary log commit is placed in the next group commit. See Group commit for the binary log.
  • Scope: Global
  • Data Type: numeric
  • Introduced: MariaDB 10.1.5, MariaDB 10.0.18

Binlog_group_commit_trigger_timeout


Binlog_group_commits


Binlog_snapshot_file


Binlog_snapshot_position


Binlog_stmt_cache_disk_use

  • Description: Number of non-transaction statements which used a temporary disk cache because they could not fit in the regular binary log cache, being larger than binlog_stmt_cache_size. The global value can be flushed by FLUSH STATUS.
  • Scope: Global
  • Data Type: numeric

Binlog_stmt_cache_use


Com_change_master

  • Description: Number of CHANGE MASTER TO statements executed.
  • Scope: Global, Session
  • Data Type: numeric

Com_show_binlog_status

  • Description:
  • Scope: Global, Session
  • Data Type: numeric
  • Introduced: MariaDB 10.5.2

Com_show_master_status


Com_show_new_master

  • Description:
  • Scope: Global, Session
  • Data Type: numeric
  • Removed: MariaDB 5.5

Com_show_slave_hosts

  • Description: Number of SHOW SLAVE HOSTS commands executed.
  • Scope: Global, Session
  • Data Type: numeric

Com_show_slave_status

  • Description: Number of SHOW SLAVE STATUS commands executed.
  • Scope: Global, Session
  • Data Type: numeric

Com_slave_start


Com_slave_stop


Com_start_all_slaves


Com_start_slave


Com_stop_all_slaves


Com_stop_slave


Master_gtid_wait_count

  • Description: Number of times MASTER_GTID_WAIT called.
  • Scope: Global, Session
  • Data Type: numeric
  • Introduced: MariaDB 10.1.4

Master_gtid_wait_time

  • Description: Total number of time spent in MASTER_GTID_WAIT.
  • Scope: Global, Session
  • Data Type: numeric
  • Introduced: MariaDB 10.1.4

Master_gtid_wait_timeouts

  • Description: Number of timeouts occurring in MASTER_GTID_WAIT.
  • Scope: Global, Session
  • Data Type: numeric
  • Introduced: MariaDB 10.1.4

Rpl_status

  • Description: For showing the status of fail-safe replication. Removed in MySQL 5.6, still present in MariaDB 10.0.

Rpl_transactions_multi_engine

  • Description: Number of replicated transactions that involved changes in multiple (transactional) storage engines, before considering the update of mysql.gtid_slave_pos. These are transactions that were already cross-engine, independent of the GTID position update introduced by replication. The global value can be flushed by FLUSH STATUS.
  • Scope: Global
  • Data Type: numeric
  • Introduced: MariaDB 10.3.1

Slave_connections


Slave_heartbeat_period

  • Description: Time in seconds that a heartbeat packet is requested from the master by a slave.
  • Scope: Global
  • Data Type: numeric

Slave_open_temp_tables

  • Description: Number of temporary tables the slave has open.
  • Scope: Global
  • Data Type: numeric

Slave_received_heartbeats

  • Description: Number of heartbeats the slave has received from the master.
  • Scope: Global
  • Data Type: numeric

Slave_retried_transactions

  • Description: Number of times the slave has retried transactions since the server started. The global value can be flushed by FLUSH STATUS.
  • Scope: Global
  • Data Type: numeric

Slave_running

  • Description: Whether the slave is running (both I/O and SQL threads running) or not.
  • Scope: Global
  • Data Type: numeric

Slave_skipped_errors


Slaves_connected

  • Description: Number of slaves connected.
  • Scope: Global
  • Data Type: numeric
  • Introduced: MariaDB 10.1.11

Slaves_running

  • Description: Number of slave SQL threads running.
  • Scope: Global
  • Data Type: numeric
  • Introduced: MariaDB 10.1.11

Transactions_gtid_foreign_engine

  • Description: Number of replicated transactions where the update of the gtid_slave_pos table had to choose a storage engine that did not otherwise participate in the transaction. This can indicate that setting gtid_pos_auto_engines might be useful. The global value can be flushed by FLUSH STATUS.
  • Scope: Global
  • Data Type: numeric
  • Introduced: MariaDB 10.3.1

Transactions_multi_engine


Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.