gpupgrade Configuration File

This section describes each of the parameters that you can edit and assign in the gpupgrade utility configuration file. This file is a required option for the command gpupgrade initialize.

Synopsis

# ----------------------------
# gpupgrade configuration file
# ----------------------------
#
# Parameters consist of names and values separated by an equal sign.
# Comments begin with an "#" and can begin anywhere on the line.
# Parameters commented out below are default values.


# The installation path for the source Greenplum Database.
# For example, /usr/local/<source-greenplum-version>.
# This parameter is required.
source_gphome =


# The installation path for the target Greenplum Database.
# For example, /usr/local/<target-greenplum-version>.
# This parameter is required.
target_gphome =


# The mode is the upgrade method. The choices are “link” or “copy”.
# The copy method creates a copy of the primary segments and performs the
# upgrade on the copies.
# The link method directly upgrades the primary segments.
# mode = copy


# The disk free ratio specifies what fraction of disk space must be free on
# every host in order for gpupgrade to run. The ratio ranges from 0.0 to 1.0.
# Recommended values are 0.6 [60%] for copy mode, and 0.2 [20%] for link mode.
# disk_free_ratio = 0.6

# Whether to populate pg_hba.conf with hostnames or IP addresses during
# execution of gpinitsystem and other utilities.
# Choose "true" to use host names, or "false" to use IP addresses.
use_hba_hostnames = false

# The master port for the source Greenplum installation.
# source_master_port = 5432


# The temporary port range for the target Greenplum installation.
# The temporary port range should be reserved prior to initializaton.
# The format is a comma separated list of ports and port ranges, e.g.
# “6000,6002-6005,6012.” The ports will be reconfigured to use the source
# Greenplum installation port range once upgrade is complete.
# temp_port_range = 50432-65535


# The port where the gpupgrade process will be running.
# hub_port = 7527


# The port where the agent process will be running on all hosts.
# agent_port = 6416

Description

You specify the gpupgrade initialize configuration file parameters via a INI-formatted file. A sample configuration file is provided in the directory where you extracted the downloaded gpupgrade utility. The file has required and optional parameters:

Required

  • source cluster directory
  • target cluster directory

Optional

  • gpupgrade mode
  • disk free ratio
  • source cluster master port
  • upgrade temporary port range
  • hub port that runs on master
  • agent port on the segments

See also Running gpupgrade Initialize for information about using the configuration file.

Keywords and Values

source_gphome = <path>
(Required) Sets the location of the source cluster. For example $GPHOME/bin/source_cluster_gpdb.

target_gphome = <path>
(Required) Sets the location of the target cluster.

mode = <copy | link >
(Optional) By default set to copy. Sets the mode for gpupgrade.
copy mode requires 60% free data storage available. It copies all the source cluster files on each host to the target cluster. It requires more time during the upgrade but provides a faster revert option.
link mode requires 20% free data storage available. It creates hard links from the source cluster data directories to the new target data directories on each host. It requires less time during the upgrade but requires longer time to revert to the old cluster. It cannot be used in Greenplum clusters with no standby or mirror hosts.

disk_free_ratio = <float>
(Optional) Indicates the free space requirement for the upgrade, with a range of 0.0 to 1.0. It is set by default to 0.6 - for copy mode - which requires 60% free storage space. Uncomment this value and set to 0.2 (20%) if you have specified link mode.

use_hba_hostnames = <true | false>
(Optional) Indicates whether to use host names or IP addresses during Greenplum Database initialization, in gpinitsystem and other utilities. The value of use_hba_hostnames should match the value of HBA_HOSTNAMES parameter in the Greenplum 5.x gpinitsystem_config configuration file. For more information about HBA_HOSTNAMES, see gpinitsystem.

temp_port_range = <port range>
(Optional) Specifies the range of ports to use when initializing the target cluster. Default is 50432-65535 and allocation starts from 50432 onwards.

hub_port = <int>
(Optional) Sets the master host port for the gpupgrade hub process; 7527 by default. If you have an existing application running on the default hub port, change this value accordingly.

source_gphome = <path>
(Optional) Sets the segment hosts port, where the gpupgrade agent process runs from; set to 6416 by default. If you have an existing application running on the default agent port, change this value accordingly.

Examples

See an example gpupgrade_config configuration file in the directory where you extracted the downloaded gpupgrade utility. See also Running gpupgrade Initialize for information about using the configuration file.

See Also

Running gpupgrade Initialize, Review Link vs Copy Mode, gpupgrade Process.