Greenplum: how to change the hostname in the gp_segment_configuration
search cancel

Greenplum: how to change the hostname in the gp_segment_configuration

book

Article ID: 401587

calendar_today

Updated On:

Products

VMware Tanzu Data Suite VMware Tanzu Greenplum

Issue/Introduction

In some scenarios, customer want to change the hostname of the gp_segment_configuration. You can refer to the following guide to change the hostname.

Resolution

  • backup the table gp_segment_configuration

copy  gp_segment_configuration to '/tmp/gp.backup';

 

  • add a new entry to /etc/hosts
172.80.0.217 new-hostname


  • stop the database and start the database to the master mode
gpstop -af
 
gpstart -m
 

PGOPTIONS='-c gp_session_role=utility' psql postgres
 
set allow_system_table_mods=on;
 
update gp_segment_configuration set hostname = 'new-hostname';


  • exit the psql and restart the database

gpstop -afr


  • please verify the database running status and gp_segment_configuration.
 
select * from gp_segment_configuration ;