Common commands for greenplum Clusters

Source: Internet
Author: User
Greenplum Common commands gpstate
Command Parameter Function gpstate-B => display brief State gpstate-c => display master image gping gpstart-D => specify data directory (default value: $ master_data_directory) gpstate-E => display the segment gpstate-F with image status issues => display the backup host details gpstate-I => display the griplum database version gpstate-M => display the image instance Synchronization status gpstate-P => display use port gpstate-q => quick check host status gpstate-S => display cluster details gpstate-V => display details
Gpconfig
Command Parameter Function: gpconfig-c => -- change param_name: Add new settings at the bottom of the PostgreSQL. conf file to change the configuration parameter settings. Gpconfig-V => -- value is used for the value of the configuration parameter specified by the-C option. By default, this value applies to all segment and its images, master, and backup master. Gpconfig-M => -- mastervalue master_value is used for the master value of the configuration parameter specified by the-C option. If this parameter is specified, the value applies only to master and backup master. This option can only be used with-v. Gpconfig-masteronly => when specified, gpconfig will only edit the PostgreSQL. conf file of the master. Gpconfig-r => -- remove param_name: comment out the items in the PostgreSQL. conf file to delete the configuration parameters. Gpconfig-L => -- list lists all configuration parameters supported by the gpconfig tool. Gpconfig-S => -- show param_name displays the value of the configuration parameters used on all instances (master and segment) in the greenplum database system. If the parameter values in the instance are different, the tool displays an error message. Running gpconfig with the-S => Option will directly read the parameter values from the database rather than from the PostgreSQL. conf file. If you use gpconfig to set configuration parameters in all segments and run gpconfig-s to verify the changes, you may still see the previous (old) values. You must reload the configuration file (gpstop-U) or restart the system (gpstop-R) for the change to take effect. Gpconfig -- file => for configuration parameters, the values are displayed in the PostgreSQL. conf file of all segment (master and segment) in the greenplum database system. If the parameter values in the instance are different, the tool displays a message. It must be specified with the-s option. Gpconfig -- file-compare compares the current greenplum database value with the PostgreSQL. conf file value on the host (master and segment) for configuration parameters. Gpconfig -- skipvalidation overwrites the gpconfig system verification check and allows you to operate on any server configuration parameters, including hiding parameters and restricted parameters that cannot be changed by gpconfig. When used together with the-L option (list), it displays a list of restricted parameters. Warning use this option to set parameters with caution. Gpconfig -- verbose displays additional log information during gpconfig command execution. Gpconfig -- debug sets the log output level to the debug level. Gpconfig -? |-H | -- help displays online help.
Gpstart
Command Parameter Function: gpstart-A => Quick Start | gpstart-D => specify the data directory (default value: $ master_data_directory) gpstart-q => run in quiet mode. The command output is not displayed on the screen, but is still written to the log file. Gpstart-M => connect to the master in maintenance mode for directory maintenance. For example, $ pgoptions = '-C gp_session_role = utility' Psql restart sgpstart-r => the Administrator connects to gpstart-V => to display detailed startup information
Gpstop
Command Parameter Function: gpstop-A => stop gpstop-D => specify a data directory (default: $ master_data_directory) gpstop-M => maintenance mode gpstop-q => run in quiet mode. The command output is not displayed on the screen, but is still written to the log file. Gpstop-r => stop all instances, then restart the system gpstop-u => reload the configuration file PostgreSQL. conf and pg_hba.confgpstop-V => show detailed startup information gpstop-m fast => close quickly. Any ongoing transactions are interrupted. And then roll back. Gpstop-M immediate => close immediately. Any ongoing transactions are aborted. This close mode is not recommended, and in some cases it may cause database corruption and requires manual recovery. Gpstop-M Smart => smart close. If an active connection exists, this command fails during warning. This is the default shutdown mode. Gpstop -- Host hostname => disable the segments data node. It cannot be used with-M,-R,-u, or-y.
Cluster recovery
Command Parameter Function gprecoverseg-A => quickly restore gprecoverseg-I => specify the recovery file gprecoverseg-D => specify the DATA DIRECTORY gprecoverseg-L => specify the log file gprecoverseg-r => balance data gprecoverseg-S => specify the configuration space file gprecoverseg-O => specify the recovery configuration file gprecoverseg-P => specify the additional backup machine gprecoverseg-S => specify the output configuration space File
Activate slave database Process
Command Parameter: gpactivatestandby-D path | absolute path of the data directory. Default Value: $ master_data_directorygpactivatestandby-f | force-activate the backup host gpactivatestandby-v | display the version information
Initial backup master
Command Parameter Function gpinitstandby-s standby database name => specify the new standby database gpinitstandby-D => debug mode gpinitstandby-r => remove the standby Database
References

Https://gp-docs-cn.github.io/docs/utility_guide/admin_utilities/gprecoverseg.html

Https://gpcc.docs.pivotal.io/430/topics/overview.html

Common commands for greenplum Clusters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.