Greenplum 创建表空间

1、每台节点创建文件目录 主实例 镜像实例都需要创建目录


例如 两个主 两个镜像
mkdir -p /data/seg1/pg_pri_cdr
mkdir -p /data/seg2/pg_pri_cdr

mkdir -p /data/seg1/pg_mir_cdr

mkdir -p /data/seg2/pg_mir_cdr

以上内容每台节点都需要执行


主实例建如下目录

mkdir -p /data/master/pg_master_cdr  


执行命令

$ gpfilespace -o .

根据提示

Enter a name for this filespace
> fastdisk
Checking your configuration:
Your system has 2 hosts with 2 primary and 2 mirror segments per host.
Configuring hosts: [sdw1, sdw2]
Please specify 2 locations for the primary segments, one per line:
primary location 1> /data/seg1/pg_pri_cdr
primary location 2> /data/seg2/pg_pri_cdr
Please specify 2 locations for the mirror segments, one per line:
mirror location 1> /data/seg1/pg_mir_cdr
mirror location 2> /data/seg2/pg_mir_cdr
Enter a file system location for the master:
master location> /data/master/pg_master_cdr

Example filespace configuration file:
filespace:fastdisk
mdw:1:/gp_master_filespc/gp-1
sdw1:2:/gp_pri_filespc/gp0
sdw1:3:/gp_mir_filespc/gp1
sdw2:4:/gp_mir_filespc/gp0
sdw2:5:/gp_pri_filespc/gp1
Execute the configuration file to create the filespace in Greenplum Database:
$ gpfilespace -c gpfilespace_config_1


在SQL窗口执行如下SQL创建表空间

CREATE TABLESPACE mytablespace OWNER gpadmin
FILESPACE fastdisk


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值