Greenplum中定义数据库对象之创建与管理表空间

创建与管理表空间

表空间建立在文件空间之上,文件空间建立在一系列文件系统之上。关于gpfilespace的所有说明如下所示:

 [gpadmin@master gpfs]$ gpfilespace --help

COMMAND NAME: gpfilespace

 

Creates a filespace using a configuration file that defines per-segment file system locations. Filespaces describe the physical file system resources to be used by a tablespace.

*****************************************************

OPTIONS

*****************************************************

-c | --config <fs_config_file>

 A configuration file containing:

 * An initial line denoting the new filespace name. For example: filespace:myfs

 * One line each for the master, the primary segments, and the    mirror segments. A line describes a file system location that  a particular segment database instance should use as its data  directory location to store database files associated with a  tablespace. Each line is in the format of:

   <hostname>:<dbid>:/<filesystem_dir>/<seg_datadir_name>

-l | --logdir <logfile_directory>

 The directory to write the log file. Defaults to ~/gpAdminLogs.

-o | --output <output_file_name>

 The directory location and file name to output the generated  filespace configuration file. You will be prompted to enter a  name for the filespace, a master file system location, the primary segment file system locations, and the mirror segment file system locations. For example, if your configuration has  2 primary and 2 mirror segments per host, you will be prompted for a total of 5 locations (including the master). The file system locations must exist on all hosts in your system prior  to running the gpfilespace utility. The utility will designate  segment-specific data directories within the location(s) you  specify, so it is possible to use the same location for multiple  segments. However, primaries and mirrors cannot use the same  location. After the utility creates the configuration file, you  can manually edit the file to make any required changes to the  filespace layout before creating the filespace in Greenplum Database.

 

--movetempfilespace {<filespace_name>|default}

  Moves temporary files to a new filespace or to the default location.

 

--movetransfilespace {<filespace_name>|default}

  Moves transaction files to a new filespace or to the default location.

 

--showtempfilespace

 Show the name of the filespace currently associated with temporary  files. This option checks that all primary and mirror segments, master  and master standby are using the same filespace or temporary files.You will receive a warning message and an email if any inconsistencies  exist.

 

--showtransfilespace

 Show the name of the filespace currently associated with transaction  files. This option checks that all primary and mirror segments, master  and master standby are using the same filespace or transaction files. You will receive a warning message and an email if any inconsistencies exist.

 

-v | --version (show utility version)

 Displays the version of this utility.

-? | --help (help)

 Displays the utility usage and syntax.

 

****************************

CONNECTION OPTIONS

****************************

-h host | --host host

 The host name of the machine on which the Greenplum master  database server is running. If not specified, reads from  the

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值