Loading...
MySQL 9.5 Reference Manual 9.5의 19.4.3 Monitoring Row-based Replication의 한국어 번역본입니다.
아래의 경우에 피드백에서 신고해주신다면 반영하겠습니다.
감사합니다 :)
row-based replication을 사용할 때 replication applier (SQL) thread의 현재 진행 상황은 Performance Schema instrument stage를 통해 모니터링되며, 이를 통해 작업 처리 상황을 추적하고 완료된 작업량과 예상 작업량을 확인할 수 있습니다. 이러한 Performance Schema instrument stage가 활성화되어 있으면 events_stages_current table이 applier thread와 그 진행 상황에 대한 stage를 보여 줍니다. 배경 정보는 Section 29.12.5, “Performance Schema Stage Event Tables”를 참조하십시오.
세 가지 row-based replication event type (write, update, delete)의 진행 상황을 추적하려면:
1mysql> UPDATE performance_schema.setup_instruments SET ENABLED = 'YES' 2 -> WHERE NAME LIKE 'stage/sql/Applying batch of row changes%';
events_stages_current table을 확인하여 진행 상황을 조회합니다. 예를 들어 update event의 진행 상황을 얻으려면 다음을 실행합니다:1mysql> SELECT WORK_COMPLETED, WORK_ESTIMATED FROM performance_schema.events_stages_current 2 -> WHERE EVENT_NAME LIKE 'stage/sql/Applying batch of row changes (update)'
binlog_rows_query_log_events가 활성화되어 있으면 쿼리에 대한 정보가 바이너리 로그에 저장되며 processlist_info field에 노출됩니다. 이 event를 트리거한 원래 쿼리를 보려면 다음을 실행합니다:1mysql> SELECT db, processlist_state, processlist_info FROM performance_schema.threads 2 -> WHERE processlist_state LIKE 'stage/sql/Applying batch of row changes%' AND thread_id = N;
19.4.2 Handling an Unexpected Halt of a Replica
19.4.4 Using Replication with Different Source and Replica Storage Engines