diff --git a/gpdb-doc/dita/admin_guide/managing/proxy-ic.xml b/gpdb-doc/dita/admin_guide/managing/proxy-ic.xml index df2e576a1d54364c2e76008463b6e7daffd79104..3c3669147713fef61f8bf0225c79d63ec118f98f 100644 --- a/gpdb-doc/dita/admin_guide/managing/proxy-ic.xml +++ b/gpdb-doc/dita/admin_guide/managing/proxy-ic.xml @@ -57,10 +57,10 @@

Set the gp_interconnect_proxy_addresses parameter to specify the proxy ports for the master and segment instances. The syntax for the value has the following format and you must specify the parameter value as a single-quoted string.

- <db_id>:<cont_id>:<seg_ip>:<port>[,<dbid>:<segid>:<ip>:<port> ... ] + <db_id>:<cont_id>:<seg_address>:<port>[, ... ]

For the master, standby master, and segment instance, the first three fields, - db_id, cont_id, and seg_ip can - be found in the db_id, cont_id, and seg_address + can be found in the gp_segment_configuration catalog table. The fourth field, port, is the proxy port for the Greenplum master or a segment @@ -69,12 +69,14 @@ table.

  • cont_id is the content column in the catalog table.
  • -
  • seg_ip is the IP address corresponding to the - address column in the catalog table. If the - address is a hostname, use the IP address of the hostname.
  • +
  • seg_address is the IP address or hostname corresponding to the + address column in the catalog table.
  • port is the TCP/IP port for the segment instance proxy that you specify.
  • + If a segment instance hostname is bound to a different IP address at + runtime, you must execute gpstop -U to re-load the + gp_interconnect_proxy_addresses value.

    This is an example PL/Python function that displays or sets the segment instance proxy port values for the gp_interconnect_proxy_addresses parameter. To create and run the function, you must enable PL/Python in the database with the CREATE @@ -97,7 +99,7 @@ -- A Greenplum system restart will also work. -- create or replace function my_setup_ic_proxy(delta int, action text) -returns table(dbid smallint, content smallint, ip text, port int) as $$ +returns table(dbid smallint, content smallint, address text, port int) as $$ import os import socket @@ -113,19 +115,16 @@ returns table(dbid smallint, content smallint, ip text, port int) as $$ port = seg['port'] address = seg['address'] - # lookup ip of the address - ip = socket.gethostbyname(address) - # decide the proxy port port = port + delta # append to the result list - results.append((dbid, content, ip, port)) + results.append((dbid, content, address, port)) # build the value for the GUC if value: value += ',' - value += '{}:{}:{}:{}'.format(dbid, content, ip, port) + value += '{}:{}:{}:{}'.format(dbid, content, address, port) if action.lower() == 'update proxy': os.system('''gpconfig --skipvalidation -c gp_interconnect_proxy_addresses -v "'{}'"'''.format(value)) diff --git a/gpdb-doc/dita/ref_guide/config_params/guc-list.xml b/gpdb-doc/dita/ref_guide/config_params/guc-list.xml index 00cd6dc33e7872405e678b9ba45cec2e949a1f27..f86f915192abbaaddf354ab9f446533068d741ad 100644 --- a/gpdb-doc/dita/ref_guide/config_params/guc-list.xml +++ b/gpdb-doc/dita/ref_guide/config_params/guc-list.xml @@ -3706,10 +3706,10 @@

    When the gp_interconnect_type parameter is set to proxy, You must specify a proxy port for the master, standby master, and all primary and mirror segment instances in this format:

    - <db_id>:<cont_id>:<seg_ip>:<port>[,<dbid>:<segid>:<ip>:<port> ... ] + <db_id>:<cont_id>:<seg_address>:<port>[, ... ]

    For the master, standby master, and segment instance, the first three fields, - db_id, cont_id, and seg_ip can be - found in the db_id, cont_id, and seg_address + can be found in the gp_segment_configuration catalog table. The fourth field, port, is the proxy port for the Greenplum master or a segment instance.

    - The seg_ip must be an IP address, not a hostname. - Also, If the mapping of a segment instance hostname to the IP address changes, you must - update the IP address in the parameter value. + If a segment instance hostname is bound to a different IP address at + runtime, you must execute gpstop -U to re-load the + gp_interconnect_proxy_addresses value.

    You must specify the value as a single-quoted string. This gpconfig command sets the value for gp_interconnect_proxy_addresses as a single-quoted string. The Greenplum system consists of a master and a single segment