Changing the Master Port
Greenplum Database comes configured with the default master port of 5432. You should follow this process to change the master port number. Perform these steps on your Greenplum master host.
To demonstrate how to change the port, Let's change master port from 5432 to 55432.
1.Shut down your Greenplum system in fast mode, interrupting and rolling back any active transactions. There cannot be active queries in the system when the system configuration is being altered (master only).
gpstop -M fast
2. Backup and Edit the postgresql.conf file on BOTH the master and standby servers.
cp postgresql.conf postgresql.conf.<data>
** Change the port parameter from 5432 to 55432 and then save the file.
3. Update .pgpass in /home/gpadmin with the new port on BOTH the master and standby servers.
cp .pgpass .pgpass.<date>
** Change 5432 to 55432 and then save the file
4. Update gpperfmonui.conf with the new port on BOTH the master and standby servers.
cp gpperfmonui.conf gpperfmonui.conf.<date>
** Change :5432: to :55432: and then save the file
4. Backup and then add export PGPORT=55432 to the end of the following environment scripts on BOTH the master and standby servers.
5. Restart your Greenplum Database system (master only).
6. Start a psql client session using the new port and edit the gp_segment_configuration system catalog to change the master port (master only).
psql -p 55432
UPDATE gp_segment_configuration SET port=55432 WHERE port=5432
7. Start command center (master only)
8. Update client programs (pgadmin III, Informatica, etc.) so that they connect to the new master port.