Use the segment address for WAL-replication in gpexpand
The address for WAL-replication should be the primary's `address`
in gp_segment_configuration. When running pg_basebackup,
the destination address for pg_basebackup is resolved to
the address in WAL replication by its mirror.
@@ -660,7 +660,7 @@ class SegmentTemplate:
try:
coordinatorSeg = self.gparray.coordinator
cmd = PgBaseBackup(pgdata=self.tempDir,
- host=coordinatorSeg.getSegmentHostName(),
+ host=coordinatorSeg.getSegmentAddress(),
port=str(coordinatorSeg.getSegmentPort()),
recovery_mode=False,
target_gp_dbid=dummyDBID)
