Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 37.4Mb
PDF (A4) - 37.5Mb
PDF (RPM) - 33.2Mb
HTML Download (TGZ) - 8.3Mb
HTML Download (Zip) - 8.4Mb
HTML Download (RPM) - 7.3Mb
Man Pages (TGZ) - 130.1Kb
Man Pages (Zip) - 185.6Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb

MySQL 8.0 Reference Manual  /  ...  /  Monitoring Row-based Replication

Pre-General Availability Draft: 2018-02-24

18.3.3 Monitoring Row-based Replication

The current progress of the replication applier (SQL) thread when using row-based replication is monitored through Performance Schema instrument stages, enabling you to track the processing of operations and check the amount of work completed and work estimated. When these Performance Schema instrument stages are enabled the events_stages_current table shows stages for applier threads and their progress. For background information, see Section 26.11.5, “Performance Schema Stage Event Tables”.

To track progress of all three row-based replication event types (write, update, delete):

  • Enable the three Performance Schema stages by issuing:

    mysql> UPDATE performance_schema.setup_instruments SET ENABLED = 'YES'
        -> WHERE NAME LIKE 'stage/sql/Applying batch of row changes%';
  • Wait for some events to be processed by the replication applier thread and then check progress by looking into the events_stages_current table. For example to get progress for update events issue:

    mysql> SELECT WORK_COMPLETED, WORK_ESTIMATED FROM performance_schema.events_stages_current
        -> WHERE EVENT_NAME LIKE 'stage/sql/Applying batch of row changes (update)'
  • If binlog_rows_query_log_events is enabled, information about queries is stored in the binary log and is exposed in the processlist_info field. To see the original query that triggered this event:

    mysql> SELECT db, processlist_state, processlist_info FROM performance_schema.threads
        -> WHERE processlist_state LIKE 'stage/sql/Applying batch of row changes%' AND thread_id = N;

User Comments
Sign Up Login You must be logged in to post a comment.