返回首页

gbase数据、南大通用产品文档:GBase8screate dbspace from storagepool 参数:从

更新日期:2024年09月11日

存储池创建 dbspace(SQL 管理 API)
随同 admin() 或 task() 函数,使用 create dbspace from storagepool 参数来从存储
池中的一个条目创建永久 dbspace。

GBase 8s 管理员参考
南大通用数据技术股份有限公司 - 713 -

语法

元素
描述
关键考虑
dbspace
要创建的 dbspace 名。
在 dbspace 名称中必须是唯一
的,且不可超过 128 字节。名
称必须以一个字母或下划线开
头,且仅可包括字母、数字、下
环线(_)符或 $ 字符。
first_extent
tblspace tblspace 的第一个
extent 的大小,
以 KB 为单位。

请参阅 admin() 和 task() 参数
大小规范。
initial_chunk_size
新 dbspace 的初始 chunk 大
小。
请参阅 admin() 和 task() 参数
大小规范。
mirroring_flag
二者之一:

1 = 镜像

0 = 无镜像
镜像标志是可选的。如果未指
定,则缺省是无镜像的
dbspace。
next_extent
tblspace tblspace 中下一个
extent 的大小,
以 KB 为单位。

请参阅 admin() 和 task() 参数
大小规范。
page_size
新 dbspace 的非缺省页大小,
以 KB 为单位。
页大小是可选的。
然而,
如果您
指定 mirroring 为 1,则还必
须指定页大小。
有效的页大小依
赖于计算机的缺省页大小:
l 2
KB 缺省页大小:
2、
4、
6、
8、
10、
12 或 16
KB
l 4
KB 缺省页大小:
4、
8、
12 或 16 KB

要了解创建临时 dbspace 的 admin() 或 task() 语法,请参阅 create tempdbspace 参
数:创建临时 dbspace(SQL 管理 API)。
示例

GBase 8s 管理员参考
南大通用数据技术股份有限公司 - 714 -

下列命令创建名为 dbspace3 的镜像的 dbspace。
新 dbspace 的大小为 1
GB,
页大小为 6
KB,tblspace 第一个 extent 大小为 200 KB,且下一个 extent 大小为 400 KB。
EXECUTE FUNCTION task("create dbspace from storagepool",
"dbspace3", "1 GB", "6", "1", "200", "400");
下列命令创建名为 dbspace8 的无镜像的 dbspace。新 dbspace 的大小为 50
MB。因为未
指定页大小,所以新 dbspace 为缺省页大小。
EXECUTE FUNCTION task("create dbspace from storagepool",
"dbspace8", "50000");

获取帮助
使用SQLdiag 工具前,您可以通过以下指令获取帮助。
gs_dbmind component sqldiag --help
显示如下帮助信息:
usage:
[-h] [-f CSV_FILE] [--predicted-file PREDICTED_FILE]
[--model {template,dnn}] --model-path MODEL_PATH
[--config-file CONFIG_FILE]
{train,predict,finetune}
SQLdiag integrated by openGauss.
positional arguments:
{train,predict,finetune}
The training mode is to perform feature extraction and
model training based on historical SQL statements. The
prediction mode is to predict the execution time of a
new SQL statement through the trained model.
optional arguments:
-h, --help
show this help message and exit
-f CSV_FILE, --csv-file CSV_FILE
The data set for training or prediction. The file
format is CSV. If it is two columns, the format is
(SQL statement, duration time). If it is three

GBase 8c V5 开发者手册
南大通用数据技术股份有限公司
398
columns, the format is (timestamp of SQL statement
execution time, SQL statement, duration time).
--predicted-file PREDICTED_FILE
The file path to save the predicted result.
--model {template,dnn}
Choose the model model to use.
--model-path MODEL_PATH
The storage path of the model file, used to read or
save the model file.
--config-file CONFIG_FILE

替换复合节点需要执行两次节点替换,分别替换Coordinator 服务和Data 服务。
注意

替换复合节点只能使用全新节点替换;

替换复合节点必须先进行Coordinator 服务的替换;

替换Data 服务需确认被替换节点之外的Coordinator 节点状态正常。
集群环境描述:

GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-04-10)
南大通用数据技术股份有限公司
328
Coordinator 节点:172.168.83.11,172.168.83.12,172.168.83.13
Data 节点:
vc1:172.168.83.11,172.168.83.12,172.168.83.15
Vc2:172.168.83.13,172.168.83.14
替换vc2 的复合节点172.168.83.13。