Greenplum版本升级及小版本升级示例

2023-04-27 13:33:46 浏览数 (1)

升级简介

greenplum 升级分两种:

  • 大版本升级:跨越主版本的升级,比如 4.3 or 5 to 6,6升级到7
  • 小版本升级:主版本内的升级,比如6.x to 6.newer

大版本升级

  • Greenplum 从5.28版本开始可以直接使用gpupgrade工具升级到6.9及以后的版本,工具开源:https://github.com/greenplum-db/gpupgrade。gpupgrade 是一个用于 Greenplum 数据库版本升级的工具,它提供了一种简单的方法来将 Greenplum 数据库集群从一个主要版本升级到另一个主要版本。
  • 对于GP4.3版本的数据库,如果升级到6,需要通过备份恢复的方式,可以使用gpbackup、gprestore或gpcopy 工具来实现,这种方式同样适用于GP5 to GP6

以gpcopy命令,以4.3 升级到 6 为例,升级流程如下:

  • 对原集群做好备份,并保证备份可用,如果升级失败需要原集群继续提供服务
  • 准备GP6集群,保证集群状态可用
  • 确保有足够的磁盘空间可以保留备份文件,建议数据库的5倍大小
  • 如果磁盘不够,使用gpcopy(4.3.26及以上版本 or 5.9及以上版本)命令,不建议使用–truncate-source-after参数
  • 对于GP6不兼容的扩展模块,需要在备份之前或者在restore的时候需要排除相关的表
  • GP6 的系统表、系统视图及函数变化比较大,留好操作日志,便于修复

gpupgrade 的升级流程大致如下:

  1. 确认环境:在开始升级之前,需要确认源和目标 Greenplum 数据库版本的兼容性,并确保升级环境满足一些先决条件,如空间和内存等资源。
  2. 预升级检查:运行 gpupgrade 工具的 pre-upgrade 子命令,它会检查是否满足升级所需的各种条件,例如必备软件版本、配置文件设置、备份等。
  3. 备份源数据库:在升级之前,需要对源数据库进行完整备份,以便在升级过程中发生意外情况时进行还原。
  4. 执行升级:运行 gpupgrade 工具的 upgrade 子命令,它会执行升级过程,包括关闭源数据库、备份源数据库、替换二进制文件、启动目标数据库等。
  5. 后升级检查:在升级完成后,运行 gpupgrade 工具的 post-upgrade 子命令,它会检查目标数据库是否成功启动,升级是否完成,并验证新版本的 Greenplum 数据库是否工作正常。
  6. 完成升级:在确认升级成功后,删除源数据库备份,清理 gpupgrade 工具的工作目录以及其他不必要的文件。

需要注意的是,gpupgrade 可以进行滚动升级,即升级过程不需要在整个集群中同时执行,而是逐个段进行升级。此外,如果在升级过程中出现任何问题,请参阅 gpupgrade 文档中提供的解决方案,或者向 Greenplum 社区寻求支持。

小版本升级

小版本升级步骤很简单,如下:

1、各个主机下载最新版本的安装包

2、master执行gpcheckcat -A检查所有库

3、master停库gpstop -a -M fast

4、直接安装新版本软件包:rpm -U open-source-greenplum-db-XXXXXX-rhel7-x86_64.rpm --nodeps

5、启库gpstart -a

6、检查:gpstate -i

小版本6.13.0 升级到 6.23.1升级示例

快速部署6.13.0版本

代码语言:javascript复制
wget https://ghproxy.com/https://github.com/greenplum-db/gpdb/releases/download/6.13.0/greenplum-db-6.13.0-rhel7-x86_64.rpm

-- 网卡
docker network create --subnet=172.72.0.0/16 lhrnw


docker rm -f lhrgp40
docker run -d --name lhrgp40 -h lhrgp40 
  --net=lhrnw --ip 172.72.6.40 
  -p 64340:5432 
  -v /sys/fs/cgroup:/sys/fs/cgroup 
  --privileged=true lhrbest/lhrcentos76:9.0 
  /usr/sbin/init


docker rm -f lhrgp41
docker run -d --name lhrgp41 -h lhrgp41 
  --net=lhrnw --ip 172.72.6.41 
  -p 64341:5432 
  -v /sys/fs/cgroup:/sys/fs/cgroup 
  --privileged=true lhrbest/lhrcentos76:9.0 
  /usr/sbin/init


docker rm -f lhrgp42
docker run -d --name lhrgp42 -h lhrgp42 
  --net=lhrnw --ip 172.72.6.42 
  -p 64342:5432 
  -v /sys/fs/cgroup:/sys/fs/cgroup 
  --privileged=true lhrbest/lhrcentos76:9.0 
  /usr/sbin/init


docker cp ./greenplum-db-6.13.0-rhel7-x86_64.rpm lhrgp40:/soft/
docker cp ./greenplum-db-6.13.0-rhel7-x86_64.rpm lhrgp41:/soft/
docker cp ./greenplum-db-6.13.0-rhel7-x86_64.rpm lhrgp42:/soft/



groupadd -g 530 gpadmin
useradd -g 530 -u 530 -m -d /home/gpadmin -s /bin/bash gpadmin
chown -R gpadmin:gpadmin /home/gpadmin
echo "gpadmin:lhr" | chpasswd


groupadd -g 530 gpadmin
useradd -g 530 -u 530 -m -d /home/gpadmin -s /bin/bash gpadmin
chown -R gpadmin:gpadmin /home/gpadmin
echo "gpadmin:lhr" | chpasswd



su - gpadmin

mkdir -p /home/gpadmin/conf/
cat > /home/gpadmin/conf/all_hosts <<"EOF"

lhrgp40
lhrgp41
lhrgp42

EOF

cat > /home/gpadmin/conf/seg_hosts <<"EOF"

lhrgp41
lhrgp42

EOF


./sshUserSetup.sh -user gpadmin  -hosts "lhrgp40 lhrgp41 lhrgp42" -advanced exverify –confirm
chmod 600 /home/gpadmin/.ssh/config

rpm -ivh open-source-greenplum-db-6.19.3-rhel7-x86_64.rpm 

chown -R gpadmin:gpadmin /usr/local/greenplum-db
mkdir -p /opt/greenplum/data/
chown -R gpadmin:gpadmin /opt/greenplum



echo ". /usr/local/greenplum-db/greenplum_path.sh" >> /home/gpadmin/.bashrc

echo "export MASTER_DATA_DIRECTORY=/opt/greenplum/data/master/gpseg-1" >> /home/gpadmin/.bashrc



su - gpadmin
mkdir -p /opt/greenplum/data/master
mkdir -p /opt/greenplum/data/primary
mkdir -p /opt/greenplum/data/mirror


cat > /home/gpadmin/conf/initgp_config <<"EOF"
declare -a DATA_DIRECTORY=(/opt/greenplum/data/primary)
declare -a MIRROR_DATA_DIRECTORY=(/opt/greenplum/data/mirror)
ARRAY_NAME="lhrgp"
SEG_PREFIX=gpseg
PORT_BASE=6000
MASTER_PORT=5432
MASTER_HOSTNAME=lhrgp40
MASTER_DIRECTORY=/opt/greenplum/data/master
DATABASE_NAME=lhrgpdb
MACHINE_LIST_FILE=/home/gpadmin/conf/seg_hosts
EOF

su - gpadmin
gpinitsystem -c /home/gpadmin/conf/initgp_config -h /home/gpadmin/conf/seg_hosts

echo "host all all all md5" >> /opt/greenplum/data/master/gpseg-1/pg_hba.conf

gpstop -u




docker cp ./open-source-greenplum-db-6.23.1-rhel7-x86_64.rpm lhrgp40:/soft/
docker cp ./open-source-greenplum-db-6.23.1-rhel7-x86_64.rpm lhrgp41:/soft/
docker cp ./open-source-greenplum-db-6.23.1-rhel7-x86_64.rpm lhrgp42:/soft/

提交镜像

代码语言:javascript复制
docker commit lhrgp40  gpdb_mdw:6.13.0
docker commit lhrgp41  gpdb_sdw1:6.13.0 
docker commit lhrgp42  gpdb_sdw2:6.13.0 

创建新容器

代码语言:javascript复制
docker rm -f lhrgp40
docker run -d --name lhrgp40 -h lhrgp40 
  --net=lhrnw --ip 172.72.6.40 
  -p 64340:5432 
  -v /sys/fs/cgroup:/sys/fs/cgroup 
  --privileged=true gpdb_mdw:6.13.0 
  /usr/sbin/init


docker rm -f lhrgp41
docker run -d --name lhrgp41 -h lhrgp41 
  --net=lhrnw --ip 172.72.6.41 
  -p 64341:5432 
  -v /sys/fs/cgroup:/sys/fs/cgroup 
  --privileged=true gpdb_sdw1:6.13.0 
  /usr/sbin/init


docker rm -f lhrgp42
docker run -d --name lhrgp42 -h lhrgp42 
  --net=lhrnw --ip 172.72.6.42 
  -p 64342:5432 
  -v /sys/fs/cgroup:/sys/fs/cgroup 
  --privileged=true gpdb_sdw2:6.13.0 
  /usr/sbin/init

启动并检查

代码语言:javascript复制
gpstart -a
gpcheckcat -p5432 -A

日志:

代码语言:javascript复制
[gpadmin@lhrgp40 ~]$ gpstart -a
20230223:13:29:16:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Starting gpstart with args: -a
20230223:13:29:16:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Gathering information and validating the environment...
20230223:13:29:16:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 6.13.0 build commit:4f1adf8e247a9685c19ea02bcaddfdc200937ecd Open Source'
20230223:13:29:16:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Greenplum Catalog Version: '301908232'
20230223:13:29:16:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Starting Master instance in admin mode
20230223:13:29:17:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20230223:13:29:17:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Obtaining Segment details from master...
20230223:13:29:17:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Setting new master era
20230223:13:29:17:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Master Started...
20230223:13:29:17:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Shutting down master
20230223:13:29:18:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Commencing parallel segment instance startup, please wait...
..
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Process results...
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-----------------------------------------------------
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-   Successful segment starts                                            = 2
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-   Failed segment starts                                                = 0
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-   Skipped segment starts (segments are marked down in configuration)   = 0
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-----------------------------------------------------
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Successfully started 2 of 2 segment instances 
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-----------------------------------------------------
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Starting Master instance lhrgp40 directory /opt/greenplum/data/master/gpseg-1 
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Command pg_ctl reports Master lhrgp40 instance active
20230223:13:29:21:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Connecting to dbname='template1' connect_timeout=15
20230223:13:29:22:000301 gpstart:lhrgp40:gpadmin-[INFO]:-No standby master configured.  skipping...
20230223:13:29:22:000301 gpstart:lhrgp40:gpadmin-[INFO]:-Database successfully started
[gpadmin@lhrgp40 ~]$ gpcheckcat -A

Usage: gpcheckcat [<option>] [dbname]

    -?
    -B parallel: number of worker threads
    -g dir     : generate SQL to rectify catalog corruption, put it in dir
    -p port    : DB port number
    -P passwd  : DB password
    -U uname   : DB User Name
    -v         : verbose
    -A         : all databases
    -S option  : shared table options (none, only)
    -O         : Online
    -l         : list all tests
    -R test    : run this particular test
    -C catname : run cross consistency, FK and ACL tests for this catalog table


Please specify -p port
[gpadmin@lhrgp40 ~]$ gpcheckcat -p5432 -A
Truncated batch size to number of primaries: 3

Connected as user 'gpadmin' to database 'lhrgpdb', port '5432', gpdb version '6.13'
-------------------------------------------------------------------
Batch size: 3
Performing test 'unique_index_violation'
Total runtime for test 'unique_index_violation': 0:00:01.59
Performing test 'duplicate'
Total runtime for test 'duplicate': 0:00:01.73
Performing test 'missing_extraneous'
Total runtime for test 'missing_extraneous': 0:00:00.51
Performing test 'inconsistent'
Total runtime for test 'inconsistent': 0:00:01.67
Performing test 'foreign_key'
Total runtime for test 'foreign_key': 0:00:01.15
Performing test 'acl'
Total runtime for test 'acl': 0:00:00.07
Performing test 'pgclass'
Total runtime for test 'pgclass': 0:00:00.04
Performing test 'namespace'
Total runtime for test 'namespace': 0:00:00.00
Performing test 'distribution_policy'
Total runtime for test 'distribution_policy': 0:00:00.00
Performing test 'dependency'
Total runtime for test 'dependency': 0:00:00.61
Performing test 'owner'
Total runtime for test 'owner': 0:00:00.03
Performing test 'part_integrity'
Total runtime for test 'part_integrity': 0:00:00.03
Performing test 'part_constraint'
Total runtime for test 'part_constraint': 0:00:00.12
Performing test 'orphaned_toast_tables'
Total runtime for test 'orphaned_toast_tables': 0:00:00.04
Performing test 'aoseg_table'
Total runtime for test 'aoseg_table': 0:00:00.00

SUMMARY REPORT
===================================================================
Completed 15 test(s) on database 'lhrgpdb' at 2023-02-23 13:29:51 with elapsed time 0:00:07
Found no catalog issue


Connected as user 'gpadmin' to database 'postgres', port '5432', gpdb version '6.13'
-------------------------------------------------------------------
Batch size: 3
Performing test 'unique_index_violation'
Total runtime for test 'unique_index_violation': 0:00:01.61
Performing test 'duplicate'
Total runtime for test 'duplicate': 0:00:01.29
Performing test 'missing_extraneous'
Total runtime for test 'missing_extraneous': 0:00:00.33
Performing test 'inconsistent'
Total runtime for test 'inconsistent': 0:00:01.36
Performing test 'foreign_key'
Total runtime for test 'foreign_key': 0:00:01.01
Performing test 'acl'
Total runtime for test 'acl': 0:00:00.05
Performing test 'pgclass'
Total runtime for test 'pgclass': 0:00:00.01
Performing test 'namespace'
Total runtime for test 'namespace': 0:00:00.00
Performing test 'distribution_policy'
Total runtime for test 'distribution_policy': 0:00:00.00
Performing test 'dependency'
Total runtime for test 'dependency': 0:00:00.48
Performing test 'owner'
Total runtime for test 'owner': 0:00:00.04
Performing test 'part_integrity'
Total runtime for test 'part_integrity': 0:00:00.04
Performing test 'part_constraint'
Total runtime for test 'part_constraint': 0:00:00.12
Performing test 'orphaned_toast_tables'
Total runtime for test 'orphaned_toast_tables': 0:00:00.04
Performing test 'aoseg_table'
Total runtime for test 'aoseg_table': 0:00:00.00

SUMMARY REPORT
===================================================================
Completed 15 test(s) on database 'postgres' at 2023-02-23 13:29:57 with elapsed time 0:00:06
Found no catalog issue


Connected as user 'gpadmin' to database 'template1', port '5432', gpdb version '6.13'
-------------------------------------------------------------------
Batch size: 3
Performing test 'unique_index_violation'
Total runtime for test 'unique_index_violation': 0:00:01.32
Performing test 'duplicate'
Total runtime for test 'duplicate': 0:00:01.63
Performing test 'missing_extraneous'
Total runtime for test 'missing_extraneous': 0:00:00.34
Performing test 'inconsistent'
Total runtime for test 'inconsistent': 0:00:02.32
Performing test 'foreign_key'
Total runtime for test 'foreign_key': 0:00:01.28
Performing test 'acl'
Total runtime for test 'acl': 0:00:00.11
Performing test 'pgclass'
Total runtime for test 'pgclass': 0:00:00.05
Performing test 'namespace'
Total runtime for test 'namespace': 0:00:00.00
Performing test 'distribution_policy'
Total runtime for test 'distribution_policy': 0:00:00.01
Performing test 'dependency'
Total runtime for test 'dependency': 0:00:00.72
Performing test 'owner'
Total runtime for test 'owner': 0:00:00.05
Performing test 'part_integrity'
Total runtime for test 'part_integrity': 0:00:00.04
Performing test 'part_constraint'
Total runtime for test 'part_constraint': 0:00:00.14
Performing test 'orphaned_toast_tables'
Total runtime for test 'orphaned_toast_tables': 0:00:00.07
Performing test 'aoseg_table'
Total runtime for test 'aoseg_table': 0:00:00.01

SUMMARY REPORT
===================================================================
Completed 15 test(s) on database 'template1' at 2023-02-23 13:30:05 with elapsed time 0:00:08
Found no catalog issue

所有节点软件升级

代码语言:javascript复制
[root@lhrgp40 /]# cd /soft
[root@lhrgp40 soft]# rpm -U open-source-greenplum-db-6.23.1-rhel7-x86_64.rpm 
error: Failed dependencies:
        greenplum-db-6 conflicts with open-source-greenplum-db-6-6.23.1-1.el7.x86_64
[root@lhrgp40 soft]# rpm -U open-source-greenplum-db-6.23.1-rhel7-x86_64.rpm  --nodeps
[root@lhrgp40 soft]# cd /usr/local/
[root@lhrgp40 local]# ll
total 0
drwxr-xr-x  1 root root  58 May 27  2022 bin
drwxr-xr-x  2 root root   6 Apr 11  2018 etc
drwxr-xr-x  2 root root   6 Apr 11  2018 games
lrwxrwxrwx  1 root root  30 Feb 23 13:31 greenplum-db -> /usr/local/greenplum-db-6.23.1
drwxr-xr-x 11 root root 238 Feb 23 13:06 greenplum-db-6.13.0
drwxr-xr-x 11 root root 238 Feb 23 13:31 greenplum-db-6.23.1
drwxr-xr-x  2 root root   6 Apr 11  2018 include
drwxr-xr-x  1 root root  25 May 27  2022 lib
drwxr-xr-x  2 root root   6 Apr 11  2018 lib64
drwxr-xr-x  2 root root   6 Apr 11  2018 libexec
drwxr-xr-x  2 root root   6 Apr 11  2018 sbin
drwxr-xr-x  1 root root  53 May 27  2022 share
drwxr-xr-x  2 root root   6 Apr 11  2018 src
[root@lhrgp40 local]# 

启动新版本

代码语言:javascript复制
[gpadmin@lhrgp40 ~]$ gpstart -a
20230223:13:34:35:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Starting gpstart with args: -a
20230223:13:34:35:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Gathering information and validating the environment...
20230223:13:34:35:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 6.23.1 build commit:2731a45ecb364317207c560730cf9e2cbf17d7e4 Open Source'
20230223:13:34:35:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Greenplum Catalog Version: '301908232'
20230223:13:34:36:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Starting Master instance in admin mode
20230223:13:34:36:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information
20230223:13:34:36:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Obtaining Segment details from master...
20230223:13:34:36:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Setting new master era
20230223:13:34:36:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Master Started...
20230223:13:34:36:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Shutting down master
20230223:13:34:38:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Commencing parallel segment instance startup, please wait...
20230223:13:34:39:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Process results...
20230223:13:34:39:001099 gpstart:lhrgp40:gpadmin-[INFO]:-----------------------------------------------------
20230223:13:34:39:001099 gpstart:lhrgp40:gpadmin-[INFO]:-   Successful segment starts                                            = 2
20230223:13:34:39:001099 gpstart:lhrgp40:gpadmin-[INFO]:-   Failed segment starts                                                = 0
20230223:13:34:39:001099 gpstart:lhrgp40:gpadmin-[INFO]:-   Skipped segment starts (segments are marked down in configuration)   = 0
20230223:13:34:39:001099 gpstart:lhrgp40:gpadmin-[INFO]:-----------------------------------------------------
20230223:13:34:39:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Successfully started 2 of 2 segment instances 
20230223:13:34:39:001099 gpstart:lhrgp40:gpadmin-[INFO]:-----------------------------------------------------
20230223:13:34:39:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Starting Master instance lhrgp40 directory /opt/greenplum/data/master/gpseg-1 
20230223:13:34:40:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Command pg_ctl reports Master lhrgp40 instance active
20230223:13:34:40:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Connecting to dbname='template1' connect_timeout=15
20230223:13:34:40:001099 gpstart:lhrgp40:gpadmin-[INFO]:-No standby master configured.  skipping...
20230223:13:34:40:001099 gpstart:lhrgp40:gpadmin-[INFO]:-Database successfully started
[gpadmin@lhrgp40 ~]$ gpstate -i
20230223:13:34:46:001170 gpstate:lhrgp40:gpadmin-[INFO]:-Starting gpstate with args: -i
20230223:13:34:46:001170 gpstate:lhrgp40:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 6.23.1 build commit:2731a45ecb364317207c560730cf9e2cbf17d7e4 Open Source'
20230223:13:34:46:001170 gpstate:lhrgp40:gpadmin-[INFO]:-master Greenplum Version: 'PostgreSQL 9.4.26 (Greenplum Database 6.23.1 build commit:2731a45ecb364317207c560730cf9e2cbf17d7e4 Open Source) on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 6.4.0, 64-bit compiled on Feb  7 2023 22:54:40'
20230223:13:34:46:001170 gpstate:lhrgp40:gpadmin-[INFO]:-Obtaining Segment details from master...
20230223:13:34:46:001170 gpstate:lhrgp40:gpadmin-[INFO]:-Loading version information
20230223:13:34:46:001170 gpstate:lhrgp40:gpadmin-[INFO]:-   Host      Datadir                              Port   Version                                                                                                                                                                                                             
20230223:13:34:46:001170 gpstate:lhrgp40:gpadmin-[INFO]:-   lhrgp40   /opt/greenplum/data/master/gpseg-1   5432   PostgreSQL 9.4.26 (Greenplum Database 6.23.1 build commit:2731a45ecb364317207c560730cf9e2cbf17d7e4 Open Source) on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 6.4.0, 64-bit compiled on Feb  7 2023 22:54:40
20230223:13:34:46:001170 gpstate:lhrgp40:gpadmin-[INFO]:-   lhrgp41   /opt/greenplum/data/primary/gpseg0   6000   PostgreSQL 9.4.26 (Greenplum Database 6.23.1 build commit:2731a45ecb364317207c560730cf9e2cbf17d7e4 Open Source) on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 6.4.0, 64-bit compiled on Feb  7 2023 22:54:40
20230223:13:34:46:001170 gpstate:lhrgp40:gpadmin-[INFO]:-   lhrgp42   /opt/greenplum/data/primary/gpseg1   6000   PostgreSQL 9.4.26 (Greenplum Database 6.23.1 build commit:2731a45ecb364317207c560730cf9e2cbf17d7e4 Open Source) on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 6.4.0, 64-bit compiled on Feb  7 2023 22:54:40
20230223:13:34:46:001170 gpstate:lhrgp40:gpadmin-[INFO]:-All segments are running the same software version
[gpadmin@lhrgp40 ~]$ 
[gpadmin@lhrgp40 ~]$ psql
psql (9.4.26)
Type "help" for help.

postgres=# select version();
                                                                                                      version                                                                                                      
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.4.26 (Greenplum Database 6.23.1 build commit:2731a45ecb364317207c560730cf9e2cbf17d7e4 Open Source) on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 6.4.0, 64-bit compiled on Feb  7 2023 22:54:40
(1 row)

postgres=# 

到这里,我们的GP6的小版本已经升级完成了。

参考

https://docs.vmware.com/en/VMware-Tanzu-Greenplum/6/greenplum-database/GUID-install_guide-upgrade_intro.html

https://docs.vmware.com/en/VMware-Tanzu-Greenplum-Upgrade/index.html

https://docs.vmware.com/en/VMware-Tanzu-Greenplum-Upgrade/1.5/greenplum-upgrade/GUID-index.html

https://www.modb.pro/db/488857

0 人点赞