数据仓库服务 GAUSSDB(DWS)-扫描残留文件函数:pgxc_get_scan_residualfiles(query_flag)
pgxc_get_scan_residualfiles(query_flag)
描述:pg_get_scan_residualfiles()的CN统一执行函数。该函数为集群级函数,与当前所在的数据库无关,在CN实例上运行。
参数说明:query_flag。参数类型int,用于表示执行范围。1表示CN,2表示主DN,4表示备DN,通过或运算可以得到查询并集,如1|2=3表示CN+主DN,1|2|4=7表示CN+主DN+备DN,默认值是7。
返回类型:record
返回信息如下:
名称 |
类型 |
描述 |
---|---|---|
nodename |
name |
节点名称。 |
instance_id |
text |
实例名称。 |
handled |
bool |
是否已处理。 |
dbname |
text |
数据库名称。 |
residualfile |
text |
残留文件路径。 |
size |
bigint |
文件大小,单位为byte。 |
inode |
bigint |
残留文件stat信息中的Inode。 |
atime |
timestamptz |
残留文件stat信息中的Access time。 |
mtime |
timestamptz |
残留文件stat信息中的Modifie time。 |
ctime |
timestamptz |
残留文件stat信息中的Chang time。 |
filepath |
text |
对应pgscrf_meta文件。 |
notes |
text |
注释。 |
示例:
1 2 3 4 5 6 7 8 9 10 |
SELECT * FROM pgxc_get_scan_residualfiles(); node_name | instance_id | handled | dbname | residualfile | size | inode | atime | mtime | ctime | filepath | notes --------------+-------------+---------+----------+---------------------------------------------------------------------+-------+------------+------------------------+------------------------+------------------------+---------------------------------------------------+------- dn_6001_6002 | dn_6001 | f | postgres | base/16323/2147494191 | 81920 | 805444689 | 2023-10-27 14:21:49+08 | 2023-10-27 14:23:08+08 | 2023-10-27 14:23:08+08 | pgscrf_meta_1663_16323_20231027144103839354 | dn_6001_6002 | dn_6001 | f | postgres | base/16323/2147494191_fsm | 0 | 805444690 | 2023-10-27 14:21:49+08 | 2023-10-27 14:21:49+08 | 2023-10-27 14:21:49+08 | pgscrf_meta_1663_16323_20231027144103839354 | dn_6001_6002 | dn_6001 | f | postgres | base/16323/2147494191_vm | 0 | 805444691 | 2023-10-27 14:21:49+08 | 2023-10-27 14:21:49+08 | 2023-10-27 14:21:49+08 | pgscrf_meta_1663_16323_20231027144103839354 | dn_6001_6002 | dn_6001 | f | postgres | pg_tblspc/2147484281/PG_9.2_201611171_dn_6001_6002/16323/2147894282 | 0 | 7247789391 | 2023-10-27 14:37:03+08 | 2023-10-27 14:37:03+08 | 2023-10-27 14:37:03+08 | pgscrf_meta_2147484281_16323_20231027144103839826 | cn_5001 | cn_5001 | f | postgres | base/16323/2147784070 | 40960 | 537070896 | 2023-10-27 14:38:59+08 | 2023-10-27 14:39:17+08 | 2023-10-27 14:39:17+08 | pgscrf_meta_1663_16323_20231027144103946217 | dn_6007_6008 | dn_6008 | f | postgres | base/16323/2147784073 | 24576 | 7784666105 | 2023-10-27 14:40:21+08 | 2023-10-27 14:40:34+08 | 2023-10-27 14:40:34+08 | pgscrf_meta_1663_16323_20231027144104171311 | (6 rows) |
- 数据仓库服务GaussDB(DWS)_SQL on Anywhere
- DWS安全_数据仓库服务安全_DWS数据安全管理_DWS安全保障_DWS安全策略
- 调用GaussDB(DWS) API接口_数据仓库服务调用API_如何调用API_在DWS中调用API
- DWS产品介绍_DWS产品优势_DWS功能_DWS使用场景_DWS是什么
- GaussDB(DWS)常用SQL_常用SQL命令_SQL语法
- GAUSS(DWS)工具_gsql工具_DataStudio工具_DSC工具
- DWS资源管理_GaussDB(DWS)资源管理作用_DWS资源管控
- GaussDB函数_GaussDB数据库函数_高斯数据库函数_华为云
- GaussDB数据库函数_GaussDB介绍_高斯数据库函数
- GaussDB(DWS)服务_什么是IoT数仓_如何使用IoT数仓