Starting, Stopping, Restarting Greenplum database

Starting/Restarting Greenplum Database

gpstart utility is used to start a Greenplum Database that has already been initialized by the gpinitsystem utility, but has been stopped by the gpstop utility. The gpstart utility starts the Greenplum Database by starting all the Postgres database instances of the Greenplum Database cluster. gpstart orchestrates this process and performs the process in parallel.

1. To start Greenplum Database

$gpstart

2. Restarting Greenplum Database -  gpstop utility with the -r option can stop and then restart Greenplum Database after the shutdown completes.

$ gpstop -r

3. Uploading Configuration File Changes Only-  To upload runtime configuration file changes without restarting

$ gpstop -u

Note: Active sessions pick up changes when they reconnect to the database. Many server configuration parameters require a full system restart (gpstop -r) to activate.

4. Starting Greenplum Master in Maintenance mode - You can start only the master to perform maintenance or administrative tasks without affecting data on the segments. For example, you can connect to a database only on the master instance in utility mode and edit system catalog settings.

a) Run gpstart using the -m option:

$ gpstart -m

b) Connect to the master in utility mode to do catalog maintenance. For example:

$ PGOPTIONS='-c gp_session_role=utility' psql template1

c) After completing your administrative tasks, stop the master in utility mode. Then, restart it in production mode.

$ gpstop -m

Caution: Incorrect use of maintenance mode connections can result in an inconsistent system state. Only Technical Support should perform this operation.

Stopping/Restarting Greenplum Database

1. To stop Greenplum Database

$ gpstop

2. To stop Greenplum Database in fast mode

$ gpstop -M fast

The gpstop utility uses a default of up to 64 parallel worker threads to bring down the Postgres instances that make up the Greenplum Database cluster. The system waits for any active transactions to finish before shutting down. To stop Greenplum Database immediately, use fast mode.

The gpstop utility stops or restarts your Greenplum Database system and always runs on the master host. When activated, gpstop stops all postgres processes in the system, including the master and all segment instances.

3. Restarting Greenplum Database -  gpstop utility with the -r option can stop and then restart Greenplum Database after the shutdown completes.

$ gpstop -r

4. Uploading Configuration File Changes Only-  To upload runtime configuration file changes without restarting

$ gpstop -u