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
Stop or restart the YMatrix database system.
The mxstop utility is used to stop, restart, or reload configuration files for a YMatrix cluster. When you stop a YMatrix cluster, you are effectively stopping multiple postgres database server processes managed by the data replication service. The mxstop tool uses the data replication service to handle shutdown operations across all instances.
By default, stopping the cluster is not allowed if any client connections are active. Use the -M fast option to roll back all running transactions and terminate all connections. If transactions are in progress, the default behavior is to wait for them to complete before stopping.
Use the -u option to reload configuration files. This reloads the pg_hba.conf file and runtime parameters defined in the postgresql.conf file across all postgres instances.
| Option | Description |
|---|---|
| -c or --db-cluster-id |
Specifies the target database cluster ID. Uses the default ID if omitted. |
| -m | Stops the master instance started in utility mode. |
| -M fast | Fast shutdown. Rolls back all currently active transactions and disconnects users. |
| -M immediate | Immediate shutdown. Aborts all active transactions. This mode kills all postgres processes without allowing the database to perform cleanup tasks such as transaction rollback. Use with caution. |
| -M smart | Smart shutdown. The command fails with a warning if active connections exist. This is the default mode. |
| -a or --no-prompt | Do not prompt for confirmation before proceeding. |
| -y or --no-standby | Do not stop standby instances. By default, standby instances are stopped. |
| -q or --quiet | Run in quiet mode. Output is suppressed from the terminal but still written to log files. |
| -u or --reload | Reloads the pg_hba.conf and postgresql.conf configuration files across all postgres instances without stopping the cluster. Use this option after modifying postgresql.conf or pg_hba.conf to apply new settings.Note: This only applies to runtime configuration parameters. |
| -r or --restart | Restart the entire cluster. |
| -t or --timeout |
Sets the timeout threshold (in seconds) for waiting for segment instances to stop. If segments do not stop within the specified time, mxstop displays a message indicating that one or more segments are still shutting down, and the cluster cannot be restarted until all segments have fully stopped. This option is useful when large transactions require extended rollback time, potentially exceeding the default 600-second timeout. |
| -h or --help | Display help information. |
Stop the default YMatrix cluster in fast mode without prompting:
mxstop -a -M fast
Restart the YMatrix cluster without prompting:
mxstop -ar
Reload configuration files:
mxstop -u
Note!
YMatrix 5 introduces a new database architecture and uses themxstoputility to manage cluster shutdown. It is not compatible withgpstop. Earlier versions usedgpstop.