blob: 78f4bc04f5ccd32a6e239d32084c87eb51d55757 [file] [log] [blame]
---
title: hawq config
---
Sets server configuration parameters on all nodes (master and segments) within a HAWQ system.
## Synopsis<a id="topic1__section2"></a>
``` pre
hawq config [options]]
```
``` pre
hawq config [-c hawq_property | --change=hawq_property]
       | -r param_name --remove=hawq_property [ -l | --list]
   [--skipvalidation] [--ignore_bad-hosts]
[-s hawq_property | --show hawq_property]
[-v hawq_property_value | --value=hawq_property_value] [-d hawq_home_directory]
hawq config --help
```
## Description<a id="topic1__section3"></a>
The `hawq config` utility allows you to set, unset, or view configuration properties from the `hawq-site.xml` files of all instances in your HAWQ system.
**Note:** The `hawq config` utility makes configuration properties identical and consistent across all nodes, including the master and segments. Using the utility will override any unique configurations that were defined manually in `hawq-site.xml`.
`hawq config` can only be used to manage specific properties. For example, you cannot use it to set properties such as `port`, which is required to be distinct for every segment instance. Use the `-l` (list) option to see a complete list of configuration properties supported by `hawq config`.
When `hawq config` sets a configuration property in a `hawq_site.xml` file, the new property setting always displays at the bottom of the file. When you use `hawq config` to remove a configuration property setting, `hawq config` comments out the property in all `hawq-site.xml` files, thereby restoring the system default setting. For example, if you use `hawq config `to remove (comment out) a property and later add it back (set a new value), there will be two instances of the property; one that is commented out, and one that is enabled and inserted at the bottom of the `hawq-site.xml` file.
After setting a property, you must restart your HAWQ system or reload the `hawq-site.xml` file for the change to take effect. Whether you require a restart or a reload depends on the property being set. To reload the configuration files, use `hawq stop -u`. To restart the system, use `hawq restart` .
To show the currently set values for a property across the system, use the `-s` option.
`hawq config` uses the following environment variables to connect to the HAWQ master instance and obtain system configuration information:
- `PGHOST`
- `PGPORT`
- `PGUSER`
- `PGPASSWORD`
- `PGDATABASE`
## Options<a id="topic1__section4"></a>
-c | --change *hawq\_property*
Changes a HAWQ property setting by adding the new setting to the bottom of the `hawq-site.xml` files.
-r | --remove *hawq\_property*
Removes a HAWQ property setting by commenting out the entry in the `hawq-site.xml` files.
-l | --list
Lists all HAWQ property settings supported by the `hawq config` utility.
-s | --show *property\_name*
Shows the value for a HAWQ property name used on all instances (master and segments) in the HAWQ system. If there is a discrepancy in a parameter value between segment instances, the `hawq config` utility displays an error message. Note that the `hawq config` utility reads property values directly from the database, and not the `hawq-site.xml` file. If you are using `hawq config` to set properties across all segments, then running `hawq config -s` to verify the changes, you might still see the previous (old) values. You must reload the configuration files (`hawq stop -u`) or restart the system (`hawq restart`) for changes to take effect.
-v | --value *hproperty\_value*
Set the value of the HAWQ property setting in the `hawq-site.xml` files.
--skipvalidation
Overrides the system validation checks of `hawq config` and allows you to operate on any server property, including hidden parameters and restricted parameters that cannot be changed by `hawq config`. Do not modify hidden or restricted parameters unless you are aware of all potential consequences. When used with the `-l` list option, it shows the list of restricted properties.
--ignore\_bad\_hosts
Overrides copying configuration files to a host on which SSH validation fails. If ssh to a skipped host is reestablished, make sure the configuration files are re-synched once it is reachable.
-? | -h | --help
Displays the online help.
## Examples<a id="topic1__section5"></a>
Set the `max_connections` setting to 100:
``` pre
hawq config -c max_connections -v 100
```
Comment out all instances of the `default_statistics_target` property, and restore the system default:
``` pre
hawq config -r default_statistics_target
```
List all properties supported by `hawq config`:
``` pre
hawq config -l
```
Show the values of a particular property across the system:
``` pre
hawq config -s max_connections
```
## See Also<a id="topic1__section6"></a>
/3/4