Greenplum Environment Variables
Post date: Sep 21, 2012 12:41:50 PM
Q. What are the required and optional greenplum env variable?
Required Environment Variables
This is the installed location of your Greenplum Database software. For example:
Your PATH environment variable should point to the location of the Greenplum Database bin directory. Solaris users must also add /usr/sfw/bin and /opt/sfw/bin to their PATH. For example:
The LD_LIBRARY_PATH environment variable should point to the location of the Greenplum Database/PostgreSQL library files. For Solaris, this also points to the GNU compiler and readline library files as well (readline libraries may be required for Python support on Solaris). For example:
This should point to the directory created by the gpinitsystem utility in the master data directory location. For example:
Note: GPHOME, PATH and LD_LIBRARY_PATH can be set by sourcing the greenplum_path.sh file from your Greenplum Database installation directory.
Optional Environment Variables
The following are standard PostgreSQL environment variables, which are also recognized in Greenplum Database. You may want to add the connection-related environment variables to your profile for convenience, so you do not have to type so many options on the command line for client connections. Note that these environment variables should be set on the Greenplum Database master host only.
The name of the application that is usually set by an application when it connects to the server. This name is displayed in the activity view and in log entries. The PGAPPNAME environmental variable behaves the same as the application_name connection parameter. The default value for application_name is psql. The name cannot be longer than 63 characters.
The name of the default database to use when connecting.
The Greenplum Database master host name.
The numeric IP address of the master host. This can be set instead of or in addition to PGHOST to avoid DNS lookup overhead.
The password used if the server demands password authentication. Use of this environment variable is not recommended for security reasons (some operating systems allow non-root users to see process environment variables via ps). Instead consider using the ~/.pgpass file.
The name of the password file to use for lookups. If not set, it defaults to ~/.pgpass. See the section about The Password File in the PostgreSQL documentation for more information.
Sets additional configuration parameters for the Greenplum Database master server.
The port number of the Greenplum Database server on the master host. The default port is 5432.
The Greenplum Database user name used to connect.
Sets the default style of date/time representation for a session. (Equivalent to SET datestyle TO ....)
Sets the default time zone for a session. (Equivalent to SET timezone TO ....)
Sets the default client character set encoding for a session. (Equivalent to SET client_encoding TO ....)