Greenplum扩容-横向扩容 – 记忆角落

Greenplum扩容-横向扩容

/ 0评 / 1

Greenplum扩容-横向扩容

安装前的准备

参考:https://199604.com/1570或者https://199604.com/2070

基本配置和规划

如果是配置了mirror(镜像同步),就需要一次新增至少两台机器扩容,不然会报错!!!

扩容操作

在新的两个机器进行如下操作:

参考:Greenplum集群安装-无root账号但存在sodu权限(https://199604.com/2070)中的

1.安装yum源

2.关闭防火墙

3.修改hosts

4.时间同步

5.修改系统参数

6.创建gpadmin用户

7.挂载数据磁盘并且创建gp数据目录

8.拷贝master主机的安装gp的目录

master主机操作

#master主机操作
cd /usr/local &&  tar -cf /usr/local/ greenplum-db.tar  greenplum-db

# master主机操作-复制到新机器上
scp greenplum-db.tar root@sdwnew1:/usr/local/ 
scp greenplum-db.tar root@sdwnew2:/usr/local/ 

新主机上操作

cd /usr/local
tar -xf greenplum-db.tar
chown -R gpadmin:gpadmin greenplum-db*

# 修改环境变量
vi /home/gpadmin/.bash_profile

# 添加:放对地方
# PATH=$PATH:$HOME/bin
source /usr/local/greenplum-db/greenplum_path.sh
# export PATH

# 执行一下:
source /home/gpadmin/.bash_profile

9.修改seg_hosts,all_hosts文件,添加新主机名进去,因为我这边的master也做了节点,因此seg_hosts和all_hosts是同一个文件,哈哈哈哈

10.执行建立多机信任(重做免密)

Master主机gpadmin用户建立多机信任

gpssh-exkeys -f /home/gpadmin/all_hosts

建立多机信任完毕后,测试各个节点是否能连通

gpssh -f ./all_hosts

[gpadmin@mdw gpconfigs]$ gpssh -h mdw
=> echo $HOSTNAME   
[mdw] mdw
=> exit

11.创建初始化文件

执行:gpexpand -f all_hosts后我这边是报了:(ps:因为我这边的master也做了节点,因此seg_hosts和all_hosts是同一个文件平时)

[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -f all_hosts 
20220119:17:33:52:501662 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'
20220119:17:33:52:501662 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'
20220119:17:33:53:501662 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state
20220119:17:33:53:501662 gpexpand:hljydwxywgzt4-7:gpadmin-[ERROR]:-gpexpand failed: Invalid database 'postgres' specified.  Cannot use a template database.
Please set the environment variable PGDATABASE to a different database or use the -D option to specify a database and re-run

这是因为我之前部署时候指定了数据库 因此是需要执行:gpexpand -f all_hosts -D lte_mr

[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -f all_hosts -D lte_mr
20220119:17:34:33:501872 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'
20220119:17:34:33:501872 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'
20220119:17:34:33:501872 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state

System Expansion is used to add segments to an existing GPDB array.
gpexpand did not detect a System Expansion that is in progress.

Before initiating a System Expansion, you need to provision and burn-in
the new hardware.  Please be sure to run gpcheckperf to make sure the
new hardware is working properly.

Please refer to the Admin Guide for more information.

Would you like to initiate a new System Expansion Yy|Nn (default=N):
> Y

You must now specify a mirroring strategy for the new hosts.  Spread mirroring places
a given hosts mirrored segments each on a separate host.  You must be 
adding more hosts than the number of segments per host to use this. 
Grouped mirroring places all of a given hosts segments on a single 
mirrored host.  You must be adding at least 2 hosts in order to use this.



What type of mirroring strategy would you like?
 spread|grouped (default=grouped):
> 

    By default, new hosts are configured with the same number of primary
    segments as existing hosts.  Optionally, you can increase the number
    of segments per host.

    For example, if existing hosts have two primary segments, entering a value
    of 2 will initialize two additional segments on existing hosts, and four
    segments on new hosts.  In addition, mirror segments will be added for
    these new primary segments if mirroring is enabled.


How many new primary segments per host do you want to add? (default=0):
> 

Generating configuration file...

20220119:17:35:20:501872 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Generating input file...

Input configuration files were written to 'gpexpand_inputfile_20220119_173520' and 'None'.
Please review the file and make sure that it is correct then re-run
with: gpexpand -i gpexpand_inputfile_20220119_173520 -D lte_mr

20220119:17:35:20:501872 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Exiting...

查看初始化的文件:

[gpadmin@hljydwxywgzt4-7 ~]$ ll -rth
total 199M
-rwxr-xr-x 1 gpadmin gpadmin 198M Jan 18 18:10 greenplum-db-5.28.14-rhel7-x86_64.bin
-rw-rw-r-- 1 gpadmin gpadmin  293 Jan 18 19:03 check
-rw-rw-r-- 1 gpadmin gpadmin   48 Jan 18 19:07 hostfile_gpinitsystem
-rw-rw-r-- 1 gpadmin gpadmin  400 Jan 18 19:18 gpinitsystem_config
-rw-rw-r-- 1 gpadmin gpadmin   80 Jan 19 17:18 all_hosts
drwxrwxr-x 2 gpadmin gpadmin 4.0K Jan 19 17:29 gpAdminLogs
-rw-rw-r-- 1 gpadmin gpadmin  292 Jan 19 17:35 gpexpand_inputfile_20220119_173520
[gpadmin@hljydwxywgzt4-7 ~]$ 
[gpadmin@hljydwxywgzt4-7 ~]$ cat gpexpand_inputfile_20220119_173520
hljydwxywgzt-4:hljydwxywgzt-4:40000:/data/gp/primary/gpseg3:8:3:p:41000
hljydwxywgzt3-4:hljydwxywgzt3-4:50000:/data/gp/mirror/gpseg3:11:3:m:51000
hljydwxywgzt3-4:hljydwxywgzt3-4:40000:/data/gp/primary/gpseg4:9:4:p:41000
hljydwxywgzt-4:hljydwxywgzt-4:50000:/data/gp/mirror/gpseg4:10:4:m:51000

12.初始化Segment并且创建扩容schema

执行:gpexpand -i gpexpand -i gpexpand_inputfile_20220119_173520 -D lte_mr

[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -i gpexpand_inputfile_20220119_173520 -D lte_mr
20220119:17:36:32:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'
20220119:17:36:32:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'
20220119:17:36:39:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state
20220119:17:36:40:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Readying Greenplum Database for a new expansion
20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database template1 for unalterable tables...
20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database postgres for unalterable tables...
20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database lte_mr for unalterable tables...
20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database template1 for tables with unique indexes...
20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database postgres for tables with unique indexes...
20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking database lte_mr for tables with unique indexes...
20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Heap checksum setting consistent across cluster
20220119:17:36:47:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Syncing Greenplum Database extensions
20220119:17:36:48:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-The packages on hljydwxywgzt3-4 are consistent.
20220119:17:36:48:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-The packages on hljydwxywgzt-4 are consistent.
20220119:17:36:48:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Creating segment template
20220119:17:36:48:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-VACUUM FULL on the catalog tables
20220119:17:36:50:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting copy of segment dbid 1 to location /data/master/gpexpand_01192022_502763
20220119:17:36:50:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Copying postgresql.conf from existing segment into template
20220119:17:36:51:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Copying pg_hba.conf from existing segment into template
20220119:17:36:51:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Adding new segments into template pg_hba.conf
20220119:17:36:51:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Creating schema tar file
20220119:17:36:51:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Distributing template tar file to new hosts
20220119:17:36:52:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Configuring new segments (primary)
20220119:17:36:53:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Configuring new segments (mirror)
20220119:17:36:53:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Backing up pg_hba.conf file on original segments
20220119:17:36:54:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Copying new pg_hba.conf file to original segments
20220119:17:36:54:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Configuring original segments
20220119:17:36:54:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Cleaning up temporary template files
20220119:17:36:54:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting Greenplum Database in restricted mode
20220119:17:37:01:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Stopping database
20220119:17:37:06:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking if Transaction filespace was moved
20220119:17:37:06:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Checking if Temporary filespace was moved
20220119:17:37:06:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Configuring new segment filespaces
20220119:17:37:06:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Cleaning up databases in new segments.
20220119:17:37:06:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting master in utility mode
20220119:17:37:08:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Stopping master in utility mode
20220119:17:37:12:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting Greenplum Database in restricted mode
20220119:17:37:18:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Creating expansion schema
20220119:17:37:18:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Populating gpexpand.status_detail with data from database template1
20220119:17:37:19:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Populating gpexpand.status_detail with data from database postgres
20220119:17:37:19:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Populating gpexpand.status_detail with data from database lte_mr
20220119:17:37:19:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Stopping Greenplum Database
20220119:17:37:25:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting Greenplum Database
20220119:17:37:31:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting new mirror segment synchronization
20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-************************************************
20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Initialization of the system expansion complete.
20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-To begin table expansion onto the new segments
20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-rerun gpexpand
20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-************************************************
20220119:17:37:45:502763 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Exiting...
[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -d 1:00:00
20220119:17:38:28:506460 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'
20220119:17:38:28:506460 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'
20220119:17:38:28:506460 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state
20220119:17:38:28:506460 gpexpand:hljydwxywgzt4-7:gpadmin-[ERROR]:-gpexpand failed: Error while trying to query the gpexpand schema: gpexpand schema exists in database lte_mr, not in postgres.
Set PGDATABASE or use the -D option to specify the correct database to use. 

Exiting...

13.重分布数据

执行:gpexpand -d 1:00:00 因为我需要指定数据库:gpexpand -d 1:00:00 -D lte_mr

gpexpand命令-d参数为重分布的周期,也就是最大多长时间完成,格式为hh:mm:ss,重分布完成后

[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -d 1:00:00 -D lte_mr
20220119:17:38:33:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'
20220119:17:38:33:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'
20220119:17:38:33:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state
20220119:17:38:34:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Distribution policy for table public.test_1 is 'a' 
20220119:17:38:34:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Expanding lte_mr.public.test_1
20220119:17:38:34:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Finished expanding lte_mr.public.test_1
20220119:17:38:39:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-EXPANSION COMPLETED SUCCESSFULLY
20220119:17:38:39:506508 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Exiting...
[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -c -D lte_mr
20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'
20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'
20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state


Do you want to dump the gpexpand.status_detail table to file? Yy|Nn (default=Y):
> y
20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Dumping gpexpand.status_detail to /data/master/gpseg-1/gpexpand.status_detail
20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Removing gpexpand schema
20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Cleanup Finished.  exiting...

14.移除扩容schema

执行命令:gpexpand -c因为我需要指定数据库:gpexpand -c -D lte_mr

[gpadmin@hljydwxywgzt4-7 ~]$ gpexpand -c -D lte_mr
20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'
20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'
20220119:17:38:47:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Querying gpexpand schema for current expansion state


Do you want to dump the gpexpand.status_detail table to file? Yy|Nn (default=Y):
> y
20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Dumping gpexpand.status_detail to /data/master/gpseg-1/gpexpand.status_detail
20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Removing gpexpand schema
20220119:17:38:53:506704 gpexpand:hljydwxywgzt4-7:gpadmin-[INFO]:-Cleanup Finished.  exiting...

15.查看扩容结果:gpstate -c

[gpadmin@hljydwxywgzt4-7 ~]$ gpstate -c
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-Starting gpstate with args: -c
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df'
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 8.3.23 (Greenplum Database 5.28.14 build commit:0dc3df4d0437ecfa5420f83002526cafe2cd85df) on x86_64-pc-linux-gnu, compiled by GCC gcc (GCC) 6.2.0, 64-bit compiled on Aug 24 2021 19:31:34'
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-Obtaining Segment details from master...
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:--------------------------------------------------------------
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:--Current GPDB mirror list and status
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:--Type = Spread
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:--------------------------------------------------------------
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Status                             Data State        Primary           Datadir                   Port    Mirror            Datadir                  Port
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Primary Active, Mirror Available   Synchronized      hljydwxywgzt4-7   /data/gp/primary/gpseg0   40000   hljydwxywgzt2-4   /data/gp/mirror/gpseg0   50000
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Primary Active, Mirror Available   Synchronized      hljydwxywgzt2-4   /data/gp/primary/gpseg1   40000   hljydwxywgzt-8    /data/gp/mirror/gpseg1   50000
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Primary Active, Mirror Available   Synchronized      hljydwxywgzt-8    /data/gp/primary/gpseg2   40000   hljydwxywgzt4-7   /data/gp/mirror/gpseg2   50000
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Primary Active, Mirror Available   Resynchronizing   hljydwxywgzt-4    /data/gp/primary/gpseg3   40000   hljydwxywgzt3-4   /data/gp/mirror/gpseg3   50000
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:-   Primary Active, Mirror Available   Resynchronizing   hljydwxywgzt3-4   /data/gp/primary/gpseg4   40000   hljydwxywgzt-4    /data/gp/mirror/gpseg4   50000
20220119:17:39:08:507008 gpstate:hljydwxywgzt4-7:gpadmin-[INFO]:--------------------------------------------------------------

注意:如果在扩容的时候失败或者出错了,记得回滚:gpexpand -r ,还有就是扩容成功,数据重分布成功后记得使用analyze或者analyzedb进行分析

参考:

https://www.cnblogs.com/zsql/p/14602563.html

http://www.dbdream.com.cn/2016/03/greenplum%E6%95%B0%E6%8D%AE%E5%BA%93%E6%89%A9%E5%AE%B9-%E5%A2%9E%E5%8A%A0segment/

发表评论

您的电子邮箱地址不会被公开。