SHOW BINARY STREAMS returns the binary log streams of a PolarDB-X instance, including the current binlog file and position for each stream.
Prerequisites
Before you begin, ensure that you have the SUPER or REPLICATION CLIENT privilege on your account. For information about how to manage permissions, see Manage accounts and permissions.
Syntax
SHOW BINARY STREAMS;Output
| Column | Description |
|---|---|
GROUP | The group name of the binlog stream |
STREAM | The name of the binary log stream within the group |
FILE | The current binlog file associated with the stream, in the format {stream_name}#binlog.{sequence} |
POSITION | The current position in the binlog file |
Example
SHOW BINARY STREAMS;Output:
+--------+-----------------+-------------------------------+----------+
| GROUP | STREAM | FILE | POSITION |
+--------+-----------------+-------------------------------+----------+
| group1 | group1_stream_0 | group1_stream_0#binlog.000001 | 3625148 |
| group1 | group1_stream_1 | group1_stream_1#binlog.000001 | 3625148 |
| group1 | group1_stream_2 | group1_stream_2#binlog.000001 | 3625148 |
| group1 | group1_stream_3 | group1_stream_3#binlog.000001 | 3625148 |
+--------+-----------------+-------------------------------+----------+The example shows one group (group1) with four parallel streams.