hawq start

Starts a HAWQ system.

Synopsis

  1. hawq start <object> [-l| --logdir <logfile_directory>] [-q| --quiet]
  2. [-v|--verbose] [-m|--masteronly] [-t|--timeout <timeout_seconds>]
  3. [-R | --restrict] [-U | --special-mode maintenance]
  4. [--ignore-bad-hosts cluster | allsegments]
  1. hawq start -? | -h | --help
  2. hawq start --version

Description

The hawq start utility is used to start the HAWQ server processes. When you start a HAWQ system, you are actually starting several postgres database server listener processes at once (the master and all of the segment instances). The hawq start utility handles the startup of the individual instances. Each instance is started in parallel.

The object 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.

The first time an administrator runs hawq start cluster, the utility creates a static hosts cache file named $GPHOME/etc/slaves to store the segment host names. Subsequently, the utility uses this list of hosts to start the system more efficiently. The utility will create a new hosts cache file at each startup.

The hawq start master command starts only the HAWQ master, without segment or standby nodes. These can be started later, using hawq start segment and/or hawq start standby.

Note: Typically you should always use hawq start cluster or hawq restart cluster to start the cluster. If you do end up using hawq start standby|master|segment to start nodes individually, make sure you always start the standby before the active master. Otherwise, the standby can become unsynchronized with the active master.

Before you can start a HAWQ system, you must have initialized the system or node by using hawq init <object> first.

Objects

cluster

Start a HAWQ cluster.

master

Start HAWQ master.

segment

Start a local segment node.

standby

Start a HAWQ standby.

allsegments

Start all segments.

Options

-l , —logdir <logfile_directory>

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.

-m , —masteronly

Optional. Starts the HAWQ master instance only, in utility mode, which may be useful for maintenance tasks. This mode only allows connections to the master in utility mode. For example:

  1. $ PGOPTIONS='-c gp_role=utility' psql

-R , —restrict (restricted mode)

Starts HAWQ in restricted mode (only database superusers are allowed to connect).

-t , —timeout <timeout_seconds>

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.

-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.

Examples

Start a HAWQ system:

  1. $ hawq start cluster

Start a HAWQ master in maintenance mode:

  1. $ hawq start master -m

Start a HAWQ system in restricted mode (only allow superuser connections):

  1. $ hawq start cluster -R

Start the HAWQ master instance only and connect in utility mode:

  1. $ hawq start master -m PGOPTIONS='-c gp_session_role=utility' psql

See Also

hawq stop, hawq init