All Products
Search
Document Center

PolarDB:SHOW MASTER STATUS

Last Updated:Mar 28, 2026

SHOW MASTER STATUS returns the current binary log file name and position of the primary PolarDB-X instance. Use the FULL modifier to retrieve additional performance metrics such as write throughput and replication lag.

Prerequisites

To run this statement, your account must have the SUPER or REPLICATION CLIENT privilege. For more information, see Manage accounts and permissions.

Syntax

SHOW [FULL] MASTER STATUS [WITH stream_name]
ModifierDescription
FULLReturns extended performance metrics. Requires kernel version V5.4.18 or later.
WITH stream_nameTargets a specific stream in multi-stream mode. Omit to query single-stream mode.

For the MySQL reference, see SHOW MASTER STATUS.

Return values

Standard fields

These fields are returned by all variants of the statement.

FieldDescription
FILEThe name of the current binary log file. In multi-stream mode, the file name is prefixed with the stream name (for example, group1_stream_0#binlog.000001).
POSITIONThe current write position in the binary log file.
BINLOG_DO_DBDatabases included in binary logging. Empty if no filter is set.
BINLOG_IGNORE_DBDatabases excluded from binary logging. Empty if no filter is set.
EXECUTED_GTID_SETThe set of GTIDs (Global Transaction Identifiers) that have been executed.

Extended fields (FULL)

These fields are returned only when you use the FULL modifier (kernel version V5.4.18 or later).

FieldDescription
LASTTSOThe TSO (Timestamp Oracle) of the last transaction in the binary log files.
DELAYTIMEMSThe binary log delay.
AVGWRITEEPSAverage number of events written to the binary log per second.
AVGWRITEBPSAverage number of bytes written to the binary log per second.
AVGWRITETPSAverage number of transactions written to the binary log per second.
AVGUPLOADBPSAverage number of bytes uploaded to remote storage per second.
AVGDUMPBPSAverage number of bytes of binlog dump per second.
AVGREVEPS[Needs confirmation: field appears in output but is not documented in the source.]
AVGREVBPS[Needs confirmation: field appears in output but is not documented in the source.]
EXTINFO[Needs confirmation: field appears in output but is not documented in the source.]

Examples

Query binary log status (single-stream mode)

SHOW MASTER STATUS;

Output:

*************************** 1. row ***************************
             FILE: binlog.000001
         POSITION: 4
     BINLOG_DO_DB:
 BINLOG_IGNORE_DB:
EXECUTED_GTID_SET:

Query binary log status for a specific stream (multi-stream mode)

SHOW MASTER STATUS WITH 'group1_stream_0';

Output:

+-------------------------------+----------+--------------+------------------+-------------------+
| FILE                          | POSITION | BINLOG_DO_DB | BINLOG_IGNORE_DB | EXECUTED_GTID_SET |
+-------------------------------+----------+--------------+------------------+-------------------+
| group1_stream_0#binlog.000001 |  3626808 |              |                  |                   |
+-------------------------------+----------+--------------+------------------+-------------------+

Query extended metrics

SHOW FULL MASTER STATUS \G;

Output:

show full master status \G;
*************************** 1. row ***************************
        FILE: binlog.000655
    POSITION: 6889
     LASTTSO: 718587571090751494417169409264603668500000000000000000
 DELAYTIMEMS: 210
   AVGREVEPS: 0
   AVGREVBPS: 0
 AVGWRITEEPS: 0
 AVGWRITEBPS: 199
 AVGWRITETPS: 0
AVGUPLOADBPS: 199
  AVGDUMPBPS: 219
     EXTINFO: