网络
虚拟私有云 VPC
弹性公网IP EIP
弹性负载均衡 ELB
NAT网关 NAT
云专线 DC
虚拟专用网络 VPN
云连接 CC
VPC终端节点 VPCEP
企业路由器 ER
企业交换机 ESW
全球加速 GA
企业连接 EC
云原生应用网络 ANC
安全与合规
安全技术与应用
Web应用防火墙 WAF
企业主机安全 HSS
云防火墙 CFW
安全云脑 SecMaster
DDoS防护 AAD
数据加密服务 DEW
数据库安全服务 DBSS
云堡垒机 CBH
数据安全中心 DSC
云证书管理服务 CCM
威胁检测服务 MTD
态势感知 SA
认证测试中心 CTC
边缘安全 EdgeSec
应用中间件
微服务引擎 CSE
分布式消息服务Kafka版
分布式消息服务RabbitMQ版
分布式消息服务RocketMQ版
API网关 APIG
分布式缓存服务 DCS
多活高可用服务 MAS
事件网格 EG
管理与监管
统一身份认证服务 IAM
消息通知服务 SMN
云监控服务 CES
应用运维管理 AOM
应用性能管理 APM
云日志服务 LTS
云审计服务 CTS
标签管理服务 TMS
配置审计 Config
应用身份管理服务 OneAccess
资源访问管理 RAM
组织 Organizations
资源编排服务 RFS
优化顾问 OA
IAM 身份中心
云运维中心 COC
资源治理中心 RGC
解决方案
高性能计算 HPC
SAP
混合云灾备
开天工业工作台 MIW
Haydn解决方案工厂
数字化诊断治理专家服务
云生态
云商店
合作伙伴中心
华为云开发者学堂
华为云慧通差旅
开发与运维
软件开发生产线 CodeArts
需求管理 CodeArts Req
流水线 CodeArts Pipeline
代码检查 CodeArts Check
编译构建 CodeArts Build
部署 CodeArts Deploy
测试计划 CodeArts TestPlan
制品仓库 CodeArts Artifact
移动应用测试 MobileAPPTest
CodeArts IDE Online
开源镜像站 Mirrors
性能测试 CodeArts PerfTest
应用管理与运维平台 ServiceStage
云应用引擎 CAE
开源治理服务 CodeArts Governance
华为云Astro轻应用
CodeArts IDE
Astro工作流 AstroFlow
代码托管 CodeArts Repo
漏洞管理服务 CodeArts Inspector
联接 CodeArtsLink
软件建模 CodeArts Modeling
Astro企业应用 AstroPro
CodeArts 盘古助手
华为云Astro大屏应用
计算
弹性云服务器 ECS
Flexus云服务
裸金属服务器 BMS
云手机服务器 CPH
专属主机 DeH
弹性伸缩 AS
镜像服务 IMS
函数工作流 FunctionGraph
云耀云服务器(旧版)
VR云渲游平台 CVR
Huawei Cloud EulerOS
网络
虚拟私有云 VPC
弹性公网IP EIP
弹性负载均衡 ELB
NAT网关 NAT
云专线 DC
虚拟专用网络 VPN
云连接 CC
VPC终端节点 VPCEP
企业路由器 ER
企业交换机 ESW
全球加速 GA
企业连接 EC
云原生应用网络 ANC
CDN与智能边缘
内容分发网络 CDN
智能边缘云 IEC
智能边缘平台 IEF
CloudPond云服务
安全与合规
安全技术与应用
Web应用防火墙 WAF
企业主机安全 HSS
云防火墙 CFW
安全云脑 SecMaster
DDoS防护 AAD
数据加密服务 DEW
数据库安全服务 DBSS
云堡垒机 CBH
数据安全中心 DSC
云证书管理服务 CCM
威胁检测服务 MTD
态势感知 SA
认证测试中心 CTC
边缘安全 EdgeSec
大数据
MapReduce服务 MRS
数据湖探索 DLI
表格存储服务 CloudTable
可信智能计算服务 TICS
推荐系统 RES
云搜索服务 CSS
数据可视化 DLV
数据接入服务 DIS
数据仓库服务 GaussDB(DWS)
数据治理中心 DataArts Studio
湖仓构建 LakeFormation
智能数据洞察 DataArts Insight
应用中间件
微服务引擎 CSE
分布式消息服务Kafka版
分布式消息服务RabbitMQ版
分布式消息服务RocketMQ版
API网关 APIG
分布式缓存服务 DCS
多活高可用服务 MAS
事件网格 EG
开天aPaaS
应用平台 AppStage
开天企业工作台 MSSE
开天集成工作台 MSSI
API中心 API Hub
云消息服务 KooMessage
交换数据空间 EDS
云地图服务 KooMap
云手机服务 KooPhone
组织成员账号 OrgID
云空间服务 KooDrive
管理与监管
统一身份认证服务 IAM
消息通知服务 SMN
云监控服务 CES
应用运维管理 AOM
应用性能管理 APM
云日志服务 LTS
云审计服务 CTS
标签管理服务 TMS
配置审计 Config
应用身份管理服务 OneAccess
资源访问管理 RAM
组织 Organizations
资源编排服务 RFS
优化顾问 OA
IAM 身份中心
云运维中心 COC
资源治理中心 RGC
区块链
区块链服务 BCS
数字资产链 DAC
华为云区块链引擎服务 HBS
解决方案
高性能计算 HPC
SAP
混合云灾备
开天工业工作台 MIW
Haydn解决方案工厂
数字化诊断治理专家服务
价格
成本优化最佳实践
专属云商业逻辑
云生态
云商店
合作伙伴中心
华为云开发者学堂
华为云慧通差旅
其他
管理控制台
消息中心
产品价格详情
系统权限
客户关联华为云合作伙伴须知
公共问题
宽限期保留期
奖励推广计划
活动
云服务信任体系能力说明
开发与运维
软件开发生产线 CodeArts
需求管理 CodeArts Req
流水线 CodeArts Pipeline
代码检查 CodeArts Check
编译构建 CodeArts Build
部署 CodeArts Deploy
测试计划 CodeArts TestPlan
制品仓库 CodeArts Artifact
移动应用测试 MobileAPPTest
CodeArts IDE Online
开源镜像站 Mirrors
性能测试 CodeArts PerfTest
应用管理与运维平台 ServiceStage
云应用引擎 CAE
开源治理服务 CodeArts Governance
华为云Astro轻应用
CodeArts IDE
Astro工作流 AstroFlow
代码托管 CodeArts Repo
漏洞管理服务 CodeArts Inspector
联接 CodeArtsLink
软件建模 CodeArts Modeling
Astro企业应用 AstroPro
CodeArts 盘古助手
华为云Astro大屏应用
存储
对象存储服务 OBS
云硬盘 EVS
云备份 CBR
高性能弹性文件服务 SFS Turbo
弹性文件服务 SFS
存储容灾服务 SDRS
云硬盘备份 VBS
云服务器备份 CSBS
数据快递服务 DES
云存储网关 CSG
专属分布式存储服务 DSS
数据工坊 DWR
地图数据 MapDS
键值存储服务 KVS
容器
云容器引擎 CCE
云容器实例 CCI
容器镜像服务 SWR
云原生服务中心 OSC
应用服务网格 ASM
华为云UCS
数据库
云数据库 RDS
数据复制服务 DRS
文档数据库服务 DDS
分布式数据库中间件 DDM
云数据库 GaussDB
云数据库 GeminiDB
数据管理服务 DAS
数据库和应用迁移 UGO
云数据库 TaurusDB
人工智能
AI开发平台ModelArts
华为HiLens
图引擎服务 GES
图像识别 Image
文字识别 OCR
自然语言处理 NLP
内容审核 Moderation
图像搜索 ImageSearch
医疗智能体 EIHealth
企业级AI应用开发专业套件 ModelArts Pro
人脸识别服务 FRS
对话机器人服务 CBS
语音交互服务 SIS
人证核身服务 IVS
视频智能分析服务 VIAS
城市智能体
自动驾驶云服务 Octopus
盘古大模型 PanguLargeModels
IoT物联网
设备接入 IoTDA
全球SIM联接 GSL
IoT数据分析 IoTA
路网数字化服务 DRIS
IoT边缘 IoTEdge
设备发放 IoTDP
企业应用
域名注册服务 Domains
云解析服务 DNS
企业门户 EWP
ICP备案
商标注册
华为云WeLink
华为云会议 Meeting
隐私保护通话 PrivateNumber
语音通话 VoiceCall
消息&短信 MSGSMS
云管理网络
SD-WAN 云服务
边缘数据中心管理 EDCM
云桌面 Workspace
应用与数据集成平台 ROMA Connect
ROMA资产中心 ROMA Exchange
API全生命周期管理 ROMA API
政企自服务管理 ESM
视频
实时音视频 SparkRTC
视频直播 Live
视频点播 VOD
媒体处理 MPC
视频接入服务 VIS
数字内容生产线 MetaStudio
迁移
主机迁移服务 SMS
对象存储迁移服务 OMS
云数据迁移 CDM
迁移中心 MGC
专属云
专属计算集群 DCC
开发者工具
SDK开发指南
API签名指南
DevStar
华为云命令行工具服务 KooCLI
Huawei Cloud Toolkit
CodeArts API
云化转型
云架构中心
云采用框架
用户服务
账号中心
费用中心
成本中心
资源中心
企业管理
工单管理
客户运营能力
国际站常见问题
支持计划
专业服务
合作伙伴支持计划
我的凭证
华为云公共事业服务云平台
工业软件
工业数字模型驱动引擎
硬件开发工具链平台云服务
工业数据转换引擎云服务
更新时间:2024-06-29 GMT+08:00
分享

资源管理函数

资源管理模块相关函数介绍。

gs_wlm_readjust_user_space(oid)

描述:用户永久存储空间校准函数。入参为用户oid,入参为0的情况下,会校准所有用户的永久存储空间。

返回值类型:text

示例:

1
2
3
4
5
SELECT gs_wlm_readjust_user_space(0);
gs_wlm_readjust_user_space
----------------------------
Exec Success
(1 row)

pgxc_wlm_readjust_schema_space()

描述:Schema永久存储空间校准函数。

返回值类型:text

示例:

1
2
3
4
5
SELECT pgxc_wlm_readjust_schema_space();
pgxc_wlm_readjust_schema_space
--------------------------------
Exec Success
(1 row)

pgxc_wlm_readjust_relfilenode_size_table()

描述:空间统计校准函数,不重建PG_RELFILENODE_SIZE系统表,重新校准用户和schema空间。

由于校准函数执行时与其余业务之间的事务隔离性,校准函数对其它的正在执行的业务不可见,导致校准函数会漏掉此类业务的空间变化,为避免校准之后出现空间差误,建议用户使用空间校准函数时,应选择空间大小稳定无变化的时候执行校准。

返回值类型:text

示例:

1
2
3
4
5
SELECT pgxc_wlm_readjust_schema_space();
pgxc_wlm_readjust_relfilenode_size_table
-----------------------------------------
Exec Success
(1 row)

pgxc_wlm_readjust_relfilenode_size_table(integer)

描述:空间统计校准函数。

由于校准函数执行时与其余业务之间的事务隔离性,校准函数对其它的正在执行的业务不可见,导致校准函数会漏掉此类业务的空间变化,为避免校准之后出现空间差误,建议用户使用空间校准函数时,应选择空间大小稳定无变化的时候执行校准。

参数:取值范围为0~4,不同的入参值代表不同的校准粒度。

  • 入参为0(默认入参为0):不重建PG_RELFILENODE_SIZE系统表,重新校准用户和schema空间。
  • 入参为1:重建PG_RELFILENODE_SIZE系统表,并且重新校准用户和schema空间。
  • 入参为2:重建PG_RELFILENODE_SIZE系统表。
  • 入参为3:重新校准schema空间。
  • 入参为4:重新校准用户空间。

返回值类型:text

示例:

1
2
3
4
5
SELECT * FROM  pgxc_wlm_readjust_relfilenode_size_table(1);
    result
--------------
 Exec success
(1 row)

pgxc_wlm_get_schema_space(cstring)

描述:在CN上查询某个逻辑集群下各实例的Schema空间信息,入参为逻辑集群名称。

返回值类型:record

函数返回字段如下:

名称

类型

描述

schemaname

text

模式名

schemaid

oid

模式OID

databasename

text

数据库名

databaseid

oid

数据库OID

nodename

text

实例名称

nodegroup

text

节点组名称

usedspace

bigint

已使用的空间大小

permspace

bigint

空间上限值

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
SELECT * FROM pgxc_wlm_get_schema_space('group1');
     schemaname     | schemaid | databasename | databaseid |   nodename   |  nodegroup   | usedspace | permspace
--------------------+----------+--------------+------------+--------------+--------------+-----------+-----------
 pg_catalog         |       11 | test1        |      16384 | datanode1    | installation |   9469952 |        -1
 public             |     2200 | postgres     |      15253 | datanode1    | installation |  25280512 |        -1
 pg_toast           |       99 | test1        |      16384 | datanode1    | installation |   1859584 |        -1
 cstore             |      100 | test1        |      16384 | datanode1    | installation |         0 |        -1
 data_redis         |    18106 | postgres     |      15253 | datanode1    | installation |    655360 |        -1
 data_redis         |    18116 | test1        |      16384 | datanode1    | installation |         0 |        -1
 public             |     2200 | test1        |      16384 | datanode1    | installation |     16384 |        -1
 dbms_om            |     3987 | postgres     |      15253 | datanode1    | installation |         0 |        -1
 dbms_job           |     3988 | postgres     |      15253 | datanode1    | installation |         0 |        -1
 dbms_om            |     3987 | test1        |      16384 | datanode1    | installation |         0 |        -1
 dbms_job           |     3988 | test1        |      16384 | datanode1    | installation |         0 |        -1
 sys                |    11693 | postgres     |      15253 | datanode1    | installation |         0 |        -1
 sys                |    11693 | test1        |      16384 | datanode1    | installation |         0 |        -1
 utl_file           |    14644 | postgres     |      15253 | datanode1    | installation |         0 |        -1
 utl_raw            |    14669 | postgres     |      15253 | datanode1    | installation |         0 |        -1
 dbms_sql           |    14674 | postgres     |      15253 | datanode1    | installation |         0 |        -1
 dbms_output        |    14662 | postgres     |      15253 | datanode1    | installation |         0 |        -1
 dbms_random        |    14666 | postgres     |      15253 | datanode1    | installation |         0 |        -1
 dbms_lob           |    14701 | postgres     |      15253 | datanode1    | installation |         0 |        -1
 information_schema |    14300 | postgres     |      15253 | datanode1    | installation |    294912 |        -1
 information_schema |    14300 | test1        |      16384 | datanode1    | installation |    294912 |        -1
 utl_file           |    14644 | test1        |      16384 | datanode1    | installation |         0 |        -1
 dbms_output        |    14662 | test1        |      16384 | datanode1    | installation |         0 |        -1
 dbms_random        |    14666 | test1        |      16384 | datanode1    | installation |         0 |        -1
 utl_raw            |    14669 | test1        |      16384 | datanode1    | installation |         0 |        -1
 dbms_sql           |    14674 | test1        |      16384 | datanode1    | installation |         0 |        -1
 dbms_lob           |    14701 | test1        |      16384 | datanode1    | installation |         0 |        -1
 pg_catalog         |       11 | postgres     |      15253 | datanode1    | installation |  13049856 |        -1
 redisuser          |    16387 | postgres     |      15253 | datanode1    | installation |    630784 |        -1
 pg_toast           |       99 | postgres     |      15253 | datanode1    | installation |   3080192 |        -1
 cstore             |      100 | postgres     |      15253 | datanode1    | installation |   2408448 |        -1
 pg_catalog         |       11 | test1        |      16384 | datanode2    | installation |   9469952 |        -1
 public             |     2200 | postgres     |      15253 | datanode2    | installation |  25214976 |        -1
 pg_toast           |       99 | test1        |      16384 | datanode2    | installation |   1859584 |        -1
 cstore             |      100 | test1        |      16384 | datanode2    | installation |         0 |        -1
 data_redis         |    18106 | postgres     |      15253 | datanode2    | installation |    655360 |        -1
 data_redis         |    18116 | test1        |      16384 | datanode2    | installation |         0 |        -1
 public             |     2200 | test1        |      16384 | datanode2    | installation |     16384 |        -1
 dbms_om            |     3987 | postgres     |      15253 | datanode2    | installation |         0 |        -1
 dbms_job           |     3988 | postgres     |      15253 | datanode2    | installation |         0 |        -1
 dbms_om            |     3987 | test1        |      16384 | datanode2    | installation |         0 |        -1
 dbms_job           |     3988 | test1        |      16384 | datanode2    | installation |         0 |        -1

pgxc_wlm_analyze_schema_space(cstring)

描述:在CN上查询某个逻辑集群下集群整体的Schema空间信息,入参为逻辑集群名称。

返回值类型:record

函数返回字段如下:

名称

类型

描述

schemaname

text

模式名

databasename

text

数据库名

nodegroup

text

节点组名称

total_value

bigint

该模式的集群空间总值

avg_value

bigint

该模式的各实例空间平均值

skew_percent

integer

倾斜率

extend_info

text

提供信息包括:单实例空间最大值、单实例空间最小值以及最大最小空间所在的实例名

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SELECT * FROM pgxc_wlm_analyze_schema_space('group1');
     schemaname     | databasename |  nodegroup   | total_value | avg_value | skew_percent |                  extend_info
--------------------+--------------+--------------+-------------+-----------+--------------+-----------------------------------------------
 pg_catalog         | test1        | installation |    56819712 |   9469952 |            0 | min:9469952 datanode1,max:9469952 datanode1
 public             | postgres     | installation |   150495232 |  25082538 |            0 | min:24903680 datanode6,max:25280512 datanode1
 pg_toast           | test1        | installation |    11157504 |   1859584 |            0 | min:1859584 datanode1,max:1859584 datanode1
 cstore             | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 data_redis         | postgres     | installation |     1966080 |    327680 |           50 | min:0 datanode4,max:655360 datanode1
 data_redis         | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 public             | test1        | installation |       98304 |     16384 |            0 | min:16384 datanode1,max:16384 datanode1
 dbms_om            | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_job           | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_om            | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_job           | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 sys                | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 sys                | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 utl_file           | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 utl_raw            | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_sql           | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_output        | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_random        | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_lob           | postgres     | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 information_schema | postgres     | installation |     1769472 |    294912 |            0 | min:294912 datanode1,max:294912 datanode1
 information_schema | test1        | installation |     1769472 |    294912 |            0 | min:294912 datanode1,max:294912 datanode1
 utl_file           | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_output        | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_random        | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 utl_raw            | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_sql           | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 dbms_lob           | test1        | installation |           0 |         0 |            0 | min:0 datanode1,max:0 datanode1
 pg_catalog         | postgres     | installation |    75431936 |  12571989 |            3 | min:12124160 datanode4,max:13049856 datanode1
 redisuser          | postgres     | installation |     1884160 |    314026 |           50 | min:16384 datanode4,max:630784 datanode1
 pg_toast           | postgres     | installation |    17154048 |   2859008 |            7 | min:2637824 datanode4,max:3080192 datanode1
 cstore             | postgres     | installation |    15294464 |   2549077 |            5 | min:2408448 datanode1,max:2703360 datanode6
(31 rows)

gs_wlm_set_queryband_action(cstring,cstring,int4)

描述:设置query_band关联行为和次序。

返回值类型:boolean

函数入参字段如下:

名称

类型

描述

qband

cstring

query_band键值对,长度上限为63个字符。

action

cstring

query_band关联行为。

order

int4

query_band搜索次序,缺省参数,默认为-1。

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
SELECT * FROM gs_wlm_set_queryband_action('a=1','respool=p1');
 gs_wlm_set_queryband_action
-----------------------------
 t
(1 row)
SELECT * FROM gs_wlm_set_queryband_action('a=3','respool=p1;priority=rush',1);
 gs_wlm_set_queryband_action
-----------------------------
 t
(1 row)

gs_wlm_set_queryband_order(cstring,int4)

描述:设置query_band次序。

返回值类型:boolean

函数入参字段如下:

名称

类型

描述

qband

cstring

query_band键值对

order

int4

query_band搜索次序,缺省参数,默认为-1

示例:

1
2
3
4
5
SELECT * FROM gs_wlm_set_queryband_order('a=1',2);
 gs_wlm_set_queryband_action
-----------------------------
 t
(1 row)

gs_wlm_get_queryband_action(cstring)

描述:查询query_band关联行为和次序。

返回值类型:record

函数返回字段如下:

名称

类型

描述

qband

cstring

query_band键值对

respool_id

Oid

query band关联资源池OID

respool

text

query band关联资源池名

priority

text

query band关联队列内优先级

qborder

int4

query_band搜索次序

示例:

1
2
3
4
5
SELECT * FROM gs_wlm_get_queryband_action('a=1');
qband | respool_id | respool | priority | qborder
-------+------------+---------+----------+---------
 a=1   |      16388 | p1      | Medium   |      -1
(1 row)

gs_cgroup_reload_conf()

描述:在当前实例上进行cgroup配置文件在线加载。

返回值类型:record

函数返回字段如下:

名称

类型

描述

node_name

text

实例名称

node_host

text

实例所在节点的IP地址

result

text

cgroup在线加载是否成功

示例:

1
2
3
4
SELECT * FROM gs_cgroup_reload_conf();
 node_name |   node_host    | result
-----------+----------------+---------
 cn_5001   | 192.168.178.35 | success

pgxc_cgroup_reload_conf()

描述:在系统所有实例上进行cgroup配置文件在线加载。

返回值类型:record

函数返回字段如下:

名称

类型

描述

node_name

text

实例名称

node_host

text

实例所在节点的IP地址

result

text

cgroup在线加载是否成功

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
SELECT * FROM pgxc_cgroup_reload_conf();
  node_name   |    node_host    | result
--------------+-----------------+---------
 dn_6025_6026 | 192.168.178.177 | success
 dn_6049_6050 | 192.168.179.79  | success
 dn_6051_6052 | 192.168.179.79  | success
 dn_6055_6056 | 192.168.179.79  | success
 dn_6067_6068 | 192.168.181.57  | success
 dn_6023_6024 | 192.168.178.39  | success
 dn_6009_6010 | 192.168.181.21  | success
 dn_6011_6012 | 192.168.181.21  | success
 dn_6015_6016 | 192.168.181.21  | success
 dn_6029_6030 | 192.168.178.177 | success
 dn_6031_6032 | 192.168.178.177 | success
 dn_6045_6046 | 192.168.179.45  | success
 cn_5001      | 192.168.178.35  | success
 cn_5003      | 192.168.178.39  | success
 dn_6061_6062 | 192.168.181.179 | success
 cn_5006      | 192.168.179.45  | success
 cn_5004      | 192.168.178.177 | success
 cn_5002      | 192.168.181.21  | success
 cn_5005      | 192.168.178.187 | success
 dn_6019_6020 | 192.168.178.39  | success
 dn_6007_6008 | 192.168.178.35  | success
 dn_6071_6072 | 192.168.181.57  | success
 dn_6003_6004 | 192.168.178.35  | success
 dn_6013_6014 | 192.168.181.21  | success
 dn_6035_6036 | 192.168.178.187 | success
 dn_6037_6038 | 192.168.178.187 | success
 dn_6001_6002 | 192.168.178.35  | success
 dn_6063_6064 | 192.168.181.179 | success
 dn_6005_6006 | 192.168.178.35  | success
 dn_6057_6058 | 192.168.181.179 | success
 dn_6069_6070 | 192.168.181.57  | success
 dn_6027_6028 | 192.168.178.177 | success
 dn_6059_6060 | 192.168.181.179 | success
 dn_6041_6042 | 192.168.179.45  | success
 dn_6043_6044 | 192.168.179.45  | success
 dn_6047_6048 | 192.168.179.45  | success
 dn_6033_6034 | 192.168.178.187 | success
 dn_6065_6066 | 192.168.181.57  | success
 dn_6021_6022 | 192.168.178.39  | success
 dn_6017_6018 | 192.168.178.39  | success
 dn_6039_6040 | 192.168.178.187 | success
 dn_6053_6054 | 192.168.179.79  | success
(42 rows)

pgxc_cgroup_reload_conf(text)

描述:在某个节点上进行cgroup配置文件在线加载。入参为节点的IP地址。

返回值类型:record

函数返回字段如下:

名称

类型

描述

node_name

text

实例名称

node_host

text

实例所在节点的IP地址

result

text

cgroup在线加载是否成功

示例:

1
2
3
4
5
6
7
8
9
SELECT * FROM pgxc_cgroup_reload_conf('192.168.178.35');
  node_name   |   node_host    | result
--------------+----------------+---------
 cn_5001      | 192.168.178.35 | success
 dn_6007_6008 | 192.168.178.35 | success
 dn_6003_6004 | 192.168.178.35 | success
 dn_6001_6002 | 192.168.178.35 | success
 dn_6005_6006 | 192.168.178.35 | success
(5 rows)

gs_wlm_node_recover(boolean isForce)

描述:动态资源管理模式下,对CCN管控计数和作业信息进行更新恢复。该函数仅支持管理员执行,通常用于CN实例故障重启后的实例恢复,由集群管理组件(CM)调用,不建议用户直接调用。具体功能如下:

  • CN执行:通知CCN清理该CN执行的作业信息和作业对应的管控计数信息。
  • CCN执行:重置管控计数信息,并从CN上获取最新的慢车道作业信息。

返回值类型:bool

gs_wlm_node_clean(cstring nodename)

描述:动态资源管理模式下,对CCN上入参指定的CN执行的作业信息和对应的管控计数信息进行清理。该函数仅支持管理员执行,通常用于CN实例故障重启后的实例恢复,由集群管理组件(CM)调用,正常情况下不建议用户直接调用。

返回值类型:bool

pg_stat_get_wlm_node_resource_info(int4)

描述:显示所有DN资源的汇总信息。

返回值类型:record

函数返回字段如下:

名称

类型

描述

min_mem_util

integer

DN最小内存使用率。

max_mem_util

integer

DN最大内存使用率。

min_cpu_util

integer

DN最小CPU使用率。

max_cpu_util

integer

DN最大CPU使用率。

min_io_util

integer

DN最小IO使用率。

max_io_util

integer

DN最大IO使用率。

phy_usemem_rate

integer

物理节点最大内存使用率。

pg_stat_get_workload_struct_info()

描述:定位CCN排队问题的负载管理函数。此函数为内部函数,如需使用请联系技术支持工程师。

返回值类型:record

相关文档