mxstop

Stop or restart the YMatrix database system.

1 Description

The mxstop utility is used to stop, restart, or reload configuration settings for a YMatrix cluster. When stopping 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, the system does not allow stopping 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.

2 Options

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 on screen but still written to log files.
-u or --reload Reloads the pg_hba.conf file and runtime parameters from 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 requiring rollback are present during shutdown, which may take longer than the default 600-second timeout.
-h or --help Show help information.

3 Examples

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 the mxstop tool to manage cluster shutdowns. It is not compatible with gpstop. Earlier versions used the gpstop utility.

See Also: mxstart, mxstate