Quick onboard
Deployment
Data Modeling
Connecting
Migration
Query
Operations and Maintenance
Common Maintenance
Partition
Backup and Restore
Expansion
Mirroring
Resource Management
Security
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool guide
Data type
Storage Engine
Executor
Stream
DR (Disaster Recovery)
Configuration
Index
Extension
SQL Reference
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 monitoring and administration. The mxstate tool delivers this extended visibility, including:
| Option | Description |
|---|---|
| -c or --db-cluster-id |
Specifies the target database cluster ID. Uses default 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 | Lists mirror segment information. |
| -Q or --quick-status | Displays information from catalog tables. |
| -e | Shows segments in non-normal states. |
| -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 suppressed 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 of the master's listener process |
| Master data directory | Filesystem location of the master data directory |
| Master port | Port number of 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 standby master |
| Standby master state | Status 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’s data directory |
| Port | Port number of the segment’s postgres listener process |
| Current Role | Current role of the segment: Mirror or Primary |
| Preferred Role | 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 nodes, Change Tracking = segment stopped and changes being tracked on active node |
| 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’s data directory |
| Standby port | Port number of the standby’s postgres listener |
| 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 |
mxstate
mxstate -s
#or
mxstate --detailed-status
mxstate -i
#or
mxstate --show-version
mxstate -m
#or
mxstate --list-mirrors
mxstate -f
#or
mxstate --show-standby-master-details
mxstate -e
Includes the following states:
| State | Node Information |
|---|---|
| double failure | DEAD_WITH_MIRROR |
| failover in progress | DEAD_MIRROR_DOWN, DEAD_PRIMARY_DOWN |
| failover complete, requires recover | OK_MIRROR_DOWN |
| replication | NO_RESP |
| recover complete, requires rebalance | OK_MIRROR_IN_SYNC / OK_MIRROR_NOT_IN_SYNC |
| mirror not synchronized | OK_MIRROR_NOT_IN_SYNC |
Note!
YMatrix 6 introduces a new database architecture. Usemxstateto view cluster status. It is not compatible withgpstate. Earlier versions may use thegpstateutility.