Oushu Database 6.1.0.0 新特性 (发布日期:2025年1月15日)
本页目录
Oushu Database 6.1.0.0 新特性 (发布日期:2025年1月15日)#
新增auto analyze功能,采用自动增量analyze方法,提升批量场景的性能和易用性
新增全量手动带自动规则重写的物化视图
外表新增权限机制
新增postgres log rolling功能
操作系统 |
版本 |
---|---|
Redhat/Centos |
7.0 |
Redhat/Centos |
7.1 |
Redhat/Centos |
7.2 |
Redhat/Centos |
7.3 |
Redhat/Centos |
7.4 |
从 6.0.0.0 升级到 6.1.0.0#
该升级步骤仅支持 hdfs 存储, 不支持含有 magma 数据存储的集群.
修改
pg_hba.conf
停止所有负载
详细描述参见pg_hba.conf文件
导出元数据
catalog_upgrade --export=${export_path}
停止集群(连同 magma 一起)
# checkpoint多次
psql -d postgres -c "checkpoint; checkpoint;"
oushudb stop cluster -a --with_magma
oushudb ssh -f ${all_host_file} -e "source /usr/local/oushu/oushudb/oushudb_path.sh; oushudb ps" # 检查是否有残留进程
迁移集群目录
masterdd 和 segmentdd 的路径可以通过查询 oushudb-site.xml
中 oushudb_main_directory
和 oushudb_segment_directory
获得.
接下来对 masterdd 和 segmentdd 目录进行备份.
请将 ${main_host_file}/${segment_hosts_file}
替换为保存集群 main/segment 节点 hostname 的文件名称。
并将 ${masterdd}/${segmentdd}
替换为上文中获取到的 masterdd/segmentdd 的目录位置.
oushudb ssh -f ${main_hosts_file} -e "mv ${masterdd} ${masterdd}.bak"
oushudb ssh -f ${segment_hosts_file} -e "mv ${segmentdd} ${segmentdd}.bak"
接下来迁移 vsc_catalog
的 data目录.
目录的路径可以查询 magma-topology.yaml
中的 data_dir
获得. 可能会有多个目录. 将各个目录都迁移到新的位置.
# 对每一个路径都运行一遍
oushudb ssh -f ${catalog_hosts_file} -e "mv ${datadir} ${datadir}.bak"
升级 RPM
oushudb ssh -f ${all_hosts_file}
rpm -e oushudb
rpm -ivh ${newest_oushudb_rpm}
检查所有节点上的版本是否一致, 并确认为目标版本
oushudb ssh -f ${all_hosts_file} -e "magma --version"
初始化
vsc_catalog
集群
# 创建每一个 datadir 目录, ${datadir} 替换为相应的目录
oushudb ssh -f ${catalog_hosts_file} -e "mkdir -p ${datadir}"
magma start cluster
magma create vscluster --no-import-catalog
导入元数据
# ${export_path} 为第一步生成的路径
# ${csv_export_path} 为另一个新的路径, 存储导入时创建的文件
catalog_upgrade --import=${export_path} --csv-out=${csv_export_path}
元数据验证
catalog_upgrade --verify --verify-data=${csv_export_path} --verify-filter=.*
该命令必须运行成功, 否则进行回退.
初始化集群
oushudb init cluster --no_post_init
恢复
pg_hba.conf
配置
升级失败回退步骤#
如果 < 步骤 2, 不需要恢复, 旧集群仍然可用.
如果 < 步骤 3, 恢复旧集群即可.
如果步骤 3 已经执行结束或者执行到一半, 按照以下步骤恢复.
停止所有可能启动的 oushudb 进程.
oushudb stop cluster -a --with_magma
oushudb ssh ${all_hosts_file} -e "oushudb ps" # 检查残留进程
将步骤 3 备份的目录全部恢复至原位. (恢复前应删除新创建的目录)
降级 RPM 至原先版本
启动旧集群
oushudb start cluster -a --with_magma
恢复
pg_hba.conf