Displays the status of a running YMatrix database system.
The mxstate utility retrieves status information about the database cluster.
It provides detailed insights into the operational state of a YMatrix database instance. Since a YMatrix database system consists of multiple PostgreSQL database instances (Segments) distributed across several machines, additional status information is essential for effective system management. The mxstate tool delivers this extended visibility, including:
| Option | Description |
|---|---|
| -c or --db-cluster-id |
Specifies the target database cluster ID. Uses the default ID if omitted. |
| -s or --detailed-status | Displays detailed status, including individual segment states. |
| -o or --from-etcd-only | Shows component status read only from etcd. |
| -m or --list-mirrors | Displays mirror segment information. |
| -Q or --quick-status | Displays information from catalog tables. |
| -f or --show-standby-master-details | Displays standby master information. |
| -i or --show-version | Displays version information. |
| -q or --quiet | Runs in quiet mode. Output is not displayed on screen but still written to log files. |
| -t or --timeout |
Sets the timeout threshold in seconds for reading status. Default is 60 seconds if not specified. |
| -h or --help | Displays help information. |
The following fields are reported by mxstate -s for the host:
| Output Data | Description |
|---|---|
| Master host | Hostname of the Master node |
| Master postgres process ID | Process ID (PID) of the Master's listener process |
| Master data directory | Filesystem location of the Master data directory |
| Master port | Port number used by the postgres listener on the Master |
| Master current role | dispatch = normal operation mode, utility = maintenance mode |
| Greenplum initsystem version | Greenplum Database version when the system was first initialized |
| Greenplum current version | Current Greenplum Database version |
| Postgres version | PostgreSQL version underlying the Greenplum Database |
| Greenplum mirroring status | Physical mirroring enabled or disabled |
| Master standby | Hostname of the Master standby node |
| Standby master state | State of the standby master: active or passive |
The following fields are reported by mxstate -s for each segment:
| Output Data | Description |
|---|---|
| Hostname | Configured hostname of the system |
| Address | Network address hostname (NIC name) |
| Datadir | Filesystem location of the segment data directory |
| Port | Port number of the postgres listener process on the segment |
| Current Role | Current role of the segment: Mirror or Primary |
| Preferred Role | Initial role assigned at system initialization: Mirror or Primary |
| Mirror Status | Status of the primary/mirror pair: Synchronized = data up-to-date on both, Resynchronization = data being copied between segments, Change Tracking = segment stopped and changes being tracked |
| PID | Process ID of the segment |
| Configuration reports status as | Status recorded in system catalogs: Up/Down |
| Database status | Actual runtime status of the database: Up/Down |
The following fields are reported by mxstate -f for standby master replication status:
| Output Data | Description |
|---|---|
| Standby address | Hostname of the standby master |
| Standby data dir | Filesystem location of the standby data directory |
| Standby port | Port number of the postgres listener on the standby |
| Standby PID | Process ID of the standby master |
| Standby status | Status of the standby: Standby host passive |
| WAL Sender State | Write-Ahead Log (WAL) streaming state: streaming, startup, backup, catchup |
| Sync state | Synchronization state of WAL sender: sync |
| Sent Location | WAL sender's transaction log (xlog) record send position |
| Flush Location | WAL receiver's xlog record flush position |
| Replay Location | xlog record replay position on the standby |
Display status of the default database cluster:
mxstate
Display detailed status of the default database cluster:
mxstate -s
#or
mxstate --detailed-status
Display version information of the default database cluster:
mxstate -i
#or
mxstate --show-version
Display mirror segment information:
mxstate -m
#or
mxstate --list-mirrors
Display standby master configuration information:
mxstate -f
#or
mxstate --show-standby-master-details
Note!
YMatrix 5 introduces a new database architecture. Usemxstateto view cluster status. It is not compatible withgpstate. Earlier versions used thegpstateutility.