hawq restartShuts down and then restarts a HAWQ system after shutdown is complete.
Synopsishawq restart <object> [- l |-- logdir <logfile_directory> ] [- q |-- quiet ] [- v |-- verbose ]
[- M |-- mode smart | fast | immediate ] [- u |-- reload ] [- m |-- masteronly ] [- R |-- restrict ]
[- t |-- timeout <timeout_seconds> ] [- U | -- special - mode maintenance ]
[-- ignore - bad - hosts cluster | allsegments ]
hawq restart -? | - h | -- help
hawq restart -- version
DescriptionThe hawq restart
utility is used to shut down and restart the HAWQ server processes. It is essentially equivalent to performing a hawq stop -M smart
operation followed by hawq start
.
The in the command specifies what entity should be started: e.g. a cluster, a segment, the master node, standby node, or all segments in the cluster.
When the hawq restart
command runs, the utility uploads changes made to the master pg_hba.conf
file or to the runtime configuration parameters in the master hawq-site.xml
file without interruption of service. Note that any active sessions will not pick up the changes until they reconnect to the database.
Objectscluster
Restart a HAWQ cluster.
master
Restart HAWQ master.
segment
Restart a local segment node.
standby
Restart a HAWQ standby.
allsegments
Restart all segments.
Options-a (do not prompt)
Do not prompt the user for confirmation.
-l, —logdir
Specifies the log directory for logs of the management tools. The default is ~/hawqAdminLogs/
.
-q, —quiet
Run in quiet mode. Command output is not displayed on the screen, but is still written to the log file.
-v, —verbose
Displays detailed status, progress and error messages output by the utility.
-t, —timeout
Specifies a timeout in seconds to wait for a segment instance to start up. If a segment instance was shutdown abnormally (due to power failure or killing its postgres
database listener process, for example), it may take longer to start up due to the database recovery and validation process. If not specified, the default timeout is 600 seconds.
-M, —mode smart | fast | immediate
Smart shutdown is the default. Shutdown fails with a warning message, if active connections are found.
Fast shut down interrupts and rolls back any transactions currently in progress .
Immediate shutdown aborts transactions in progress and kills all postgres
processes without allowing the database server to complete transaction processing or clean up any temporary or in-process work files. Because of this, immediate shutdown is not recommended. In some instances, it can cause database corruption that requires manual recovery.
-u, —reload
Utility mode. This mode runs on the master, only, and only allows incoming sessions that specify gp_session_role=utility. It allows bash scripts to reload the parameter values and connect but protects the system from normal clients who might be trying to connect to the system during startup.
-R, —restrict
Starts HAWQ in restricted mode (only database superusers are allowed to connect).
-U, —special-mode maintenance
(Superuser only) Start HAWQ in [maintenance | upgrade] mode. In maintenance mode, the gp_maintenance_conn
parameter is set.
--ignore-bad-hosts cluster | allsegments
Overrides copying configuration files to a host on which SSH validation fails. If ssh to a skipped host is reestablished, make sure the configuration files are re-synched once it is reachable.
-? , -h , —help (help)
Displays the online help.
--version (show utility version)
Displays the version of this utility.
ExamplesRestart a HAWQ cluster:
$ hawq restart cluster
Restart a HAWQ system in restricted mode (only allow superuser connections):
$ hawq restart cluster - R
Start the HAWQ master instance only and connect in utility mode:
$ hawq start master - m PGOPTIONS = '-c gp_session_role=utility' psql
See Alsohawq stop , hawq start