Quick Start
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Migration
Data Query
Maintenance and Monitoring
Performance Tuning
Troubleshooting
Reference Guide
SQL Reference
FAQ
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 shutdowns 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. The default behavior waits for all active transactions to complete before stopping, unless overridden.
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: interrupts and rolls back any active transactions. |
| -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 finalization. |
| -M smart | Smart shutdown: fails with a warning if active connections exist. This is the default mode. |
| -a or --no-prompt | Do not prompt for user confirmation. |
| -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 file and runtime parameters in postgresql.conf on all postgres instances without stopping the cluster. Use this option after modifying postgresql.conf or pg_hba.conf to apply new configurations.Note: This method applies only to runtime configuration parameters. |
| -r or --restart | Restart the 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 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 rollback during shutdown, which may exceed 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 usesmxstopto manage cluster shutdowns. It is not compatible withgpstop. Previous versions usedgpstop.