29.12.11 Performance Schema Replication Tables (original) (raw)

29.12.11 Performance Schema Replication Tables

The Performance Schema provides tables that expose replication information. This is similar to the information available from the SHOW REPLICA STATUS statement, but representation in table form is more accessible and has usability benefits:

Replication Table Descriptions

The Performance Schema provides the following replication-related tables:

The following Performance Schema replication tables continue to be populated when the Performance Schema is disabled:

The exception is local timing information (start and end timestamps for transactions) in the replication tablesreplication_connection_status,replication_applier_status_by_coordinator, andreplication_applier_status_by_worker. This information is not collected when the Performance Schema is disabled.

The following sections describe each replication table in more detail, including the correspondence between the columns produced bySHOW REPLICA STATUS and the replication table columns in which the same information appears.

The remainder of this introduction to the replication tables describes how the Performance Schema populates them and which fields fromSHOW REPLICA STATUS are not represented in the tables.

Replication Table Life Cycle

The Performance Schema populates the replication tables as follows:

Replica Status Information Not In the Replication Tables

The information in the Performance Schema replication tables differs somewhat from the information available fromSHOW REPLICA STATUS because the tables are oriented toward use of global transaction identifiers (GTIDs), not file names and positions, and they represent server UUID values, not server ID values. Due to these differences, severalSHOW REPLICA STATUS columns are not preserved in the Performance Schema replication tables, or are represented a different way:

Master_Log_File  
Read_Master_Log_Pos  
Relay_Log_File  
Relay_Log_Pos  
Relay_Master_Log_File  
Exec_Master_Log_Pos  
Until_Condition  
Until_Log_File  
Until_Log_Pos  
Master_Server_Id  
Replicate_Ignore_Server_Ids  
Last_Errno  
Last_Error  

In the Performance Schema, this error information is available in the LAST_ERROR_NUMBER andLAST_ERROR_MESSAGE columns of thereplication_applier_status_by_worker table (andreplication_applier_status_by_coordinator if the replica is multithreaded). Those tables provide more specific per-thread error information than is available fromLast_Errno andLast_Error.

Replicate_Do_DB  
Replicate_Ignore_DB  
Replicate_Do_Table  
Replicate_Ignore_Table  
Replicate_Wild_Do_Table  
Replicate_Wild_Ignore_Table  

Replication Channels

The first column of the replication Performance Schema tables isCHANNEL_NAME. This enables the tables to be viewed per replication channel. In a non-multisource replication setup there is a single default replication channel. When you are using multiple replication channels on a replica, you can filter the tables per replication channel to monitor a specific replication channel. See Section 19.2.2, “Replication Channels” and Section 19.1.5.8, “Monitoring Multi-Source Replication” for more information.