blob: ce21798c4e58a7c93a0e912440e0aaa66831b043 [file] [log] [blame]
---
title: Environment Variables
---
This topic contains a reference of the environment variables that you set for HAWQ.
Set these in your users startup shell profile (such as `~/.bashrc` or `~/.bash_profile`), or in `/etc/profile`, if you want to set them for all users.
## <a id="requiredenvironmentvariables"></a>Required Environment Variables
**Note:** `GPHOME`, `PATH` and `LD_LIBRARY_PATH` can be set by sourcing the `greenplum_path.sh` file from your HAWQ installation directory.
### <a id="gphome"></a>GPHOME
This is the installed location of your HAWQ software. For example:
``` pre
GPHOME=/usr/local/hawq
export GPHOME
```
### <a id="path"></a>PATH
Your `PATH` environment variable should point to the location of the HAWQ bin directory. For example:
``` pre
PATH=$GPHOME/bin:$PATH
export PATH
```
### <a id="ld_library_path"></a>LD\_LIBRARY\_PATH
The `LD_LIBRARY_PATH` environment variable should point to the location of the `HAWQ/PostgreSQL` library files. For example:
``` pre
LD_LIBRARY_PATH=$GPHOME/lib
export LD_LIBRARY_PATH
```
## <a id="optionalenvironmentvariables"></a>Optional Environment Variables
The following are HAWQ environment variables. You may want to add the connection-related environment variables to your profile, for convenience. That way, 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 HAWQ master host only.
### <a id="pgappname"></a>PGAPPNAME
This is 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.
### <a id="pgdatabase"></a>PGDATABASE
The name of the default database to use when connecting.
### <a id="pghost"></a>PGHOST
The HAWQ master host name.
### <a id="pghostaddr"></a>PGHOSTADDR
The numeric IP address of the master host. This can be set instead of, or in addition to, `PGHOST`, to avoid DNS lookup overhead.
### <a id="pgpassword"></a>PGPASSWORD
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.
### <a id="pgpassfile"></a>PGPASSFILE
The name of the password file to use for lookups. If not set, it defaults to `~/.pgpass`.
See The Password File under [Configuring Client Authentication](../clientaccess/client_auth.html).
### <a id="pgoptions"></a>PGOPTIONS
Sets additional configuration parameters for the HAWQ master server.
### <a id="pgport"></a>PGPORT
The port number of the HAWQ server on the master host. The default port is 5432.
### <a id="pguser"></a>PGUSER
The HAWQ user name used to connect.
### <a id="pgdatestyle"></a>PGDATESTYLE
Sets the default style of date/time representation for a session. (Equivalent to `SET datestyle TO....`)
### <a id="pgtz"></a>PGTZ
Sets the default time zone for a session. (Equivalent to `SET timezone TO....`)
### <a id="pgclientencoding"></a>PGCLIENTENCODING
Sets the default client character set encoding for a session. (Equivalent to `SET client_encoding TO....`)