GaussDB-GS_SEG_SPC_SEGMENTS
GS_SEG_SPC_SEGMENTS获取所有表空间已使用的段信息。只支持管理员权限用户查询。
| 名称 | 类型 | 描述 |
|---|---|---|
| node_name | text | 节点名称。 |
| tablespace_name | name | 表空间名称。 |
| file_id | integer | 数据文件标识。 |
| bucketnode | integer | - 0~1023表示hashbucket表的bucketnode。 |
- 1024表示段页式普通表的bucketnode。
- 1025表示段页式全局临时表的bucketnode。
- 1026表示段页式unlogged表的bucketnode。- 1027表示段页式本地临时表的bucketnode。 | | forknum | integer | 段对象的分支类型。取值范围:- 0表示main fork。
- 1表示fsm fork。
- 2表示vm fork。 | | block_id | bigint | 数据扩展的起始页面号。 | | blocks | integer | 数据扩展大小。取值:1、8、128、1024、4096。 | | contents | text | 数据文件的存储内容。取值范围:- permanent:永久。
- unlogged:不记录日志。
- temporary:全局临时。
- temporary2:本地临时。 | | in_used | text | 是否已分配。取值Y/N。 | | mapblock_location | text | 扩展在map block中的位置,格式:(page_id, offset)。 | | head_file_id | integer | 段头文件标识。 | | head_block_id | bigint | 段头页面号。 | | usage_type | text | 扩展的使用类型,取值范围:- segment head表示段头。
- fork head表示分支头。
- level1 page表示level页面。
- data extent表示数据扩展。 | | remain_flag | text | 是否为shrink残留扩展。取值Y/N。 | | special_data | integer | 扩展对应反向指针的特殊数据区。 | | ipblock_location | text | 扩展反向指针位置,格式:(block_id, offset)。 |
更多详情请参考GaussDB 文档中心:doc.hcs.huawei.com/db/zh-cn/ga…