华为云用户手册

  • 常用方法 表1 PGReplicationConnection常用方法 返回值 方法 描述 throws ChainedCreateReplicationSlotBuilder createReplicationSlot() 用于创建逻辑复制槽 - void dropReplicationSlot(String slotName) 用于删除逻辑复制槽 SQLException,IOException ChainedStreamBuilder replicationStream() 用户开启逻辑复制 -
  • PGReplicationConnection的继承关系 PGReplicationConnection是逻辑复制的接口,实现类是PGReplicationConnectionImpl,该类位于org.postgresql.replication Package中,该类的声明如下: public class PGReplicationConnection implements PGReplicationConnection
  • SUMMARY_STAT_DATABASE 视图将包含数据库内汇聚的每个数据库的每一行,显示数据库统计。 表1 SUMMARY_STAT_DATABASE字段 名称 类型 描述 datname name 数据库的名称。 numbackends bigint 当前连接到该数据库的后端数。这是在返回一个反映目前状态值的视图中唯一的列;自上次重置所有其他列返回累积值。 xact_commit numeric 此数据库中已经提交的事务数。 xact_rollback numeric 此数据库中已经回滚的事务数。 blks_read numeric 在这个数据库中读取的磁盘块的数量。 blks_hit numeric 高速缓存中已经发现的磁盘块的次数,这样读取是不必要的(这只包括 GaussDB 缓冲区高速缓存,没有操作系统的文件系统缓存)。 tup_returned numeric 通过数据库查询返回的行数。 tup_fetched numeric 通过数据库查询抓取的行数。 tup_inserted bigint 通过数据库查询插入的行数。 tup_updated bigint 通过数据库查询更新的行数。 tup_deleted bigint 通过数据库查询删除的行数。 conflicts bigint 由于数据库恢复冲突取消的查询数量(只在备用服务器发生的冲突)。请参见STAT_DATABASE_CONFLI CTS 获取更多信息。 temp_files numeric 通过数据库查询创建的临时文件数量。计算所有临时文件,不论为什么创建临时文件(比如排序或者哈希),而且不管log_temp_files设置。 temp_bytes numeric 通过数据库查询写入临时文件的数据总量。计算所有临时文件,不论为什么创建临时文件,而且不管log_temp_files设置。 deadlocks bigint 在该数据库中检索的死锁数。 blk_read_time double precision 通过数据库后端读取数据文件块花费的时间,以毫秒计算。 blk_write_time double precision 通过数据库后端写入数据文件块花费的时间,以毫秒计算。 stats_reset timestamp with time zone 重置当前状态统计的时间。 父主题: Object
  • GLOBAL_REPLICATION_STAT GLOBAL_REPLICATION_STAT视图用于获得各节点描述日志同步状态信息,如发起端发送日志位置、接收端接收日志位置等。 表1 GLOBAL_REPLICATION_STAT字段 名称 类型 描述 node_name name 节点名称。 pid bigint 线程的PID。 usesysid oid 用户系统ID。 usename name 用户名。 application_name text 程序名称。 client_addr inet 客户端地址。 client_hostname text 客户端名。 client_port integer 客户端端口。 backend_start timestamp with time zone 程序启动时间。 state text 日志复制的状态: 追赶状态。 一致的流状态。 sender_sent_location text 发送端发送日志位置。 receiver_write_location text 接收端write日志位置。 receiver_flush_location text 接收端flush日志位置。 receiver_replay_location text 接收端replay日志位置。 sync_priority integer 同步复制的优先级(0表示异步)。 sync_state text 同步状态: 异步复制。 同步复制。 潜在同步者。 父主题: Utility
  • TRACK_MEMORY_CONTEXT_DETAIL 查询DBE_PERF.track_memory_context设置的内存上下文上的内存申请详细信息。只有初始用户或者具有monadmin权限的用户可以执行该函数。 表1 TRACK_MEMORY_CONTEXT_DETAIL字段 名称 类型 描述 context_name text 内存上下文的名称。 file text 内存申请位置所属的文件。 line integer 内存申请位置的行号。 size bigint 内存申请的总大小(单位:字节)。 父主题: Memory
  • 注意事项 在非阻塞连接上发送任何命令或数据之后,调用PQflush。如果返回1,则等待套接字变为读或写就绪。如果为写就绪状态,则再次调用PQflush。如果已经读到,调用PQconsumeInput,然后再次调用PQflush。重复,直到PQflush返回0。(必要检查读就绪并使用 PQconsumeInput 耗尽输入,因为服务器可能会阻止尝试向客户端发送数据(例如 NOTICE 消息),并且在客户端读取它的数据之前不会读取客户端的数据。)一旦PQflush返回0,就等待套接字准备好,然后按照上面描述读取响应。
  • 参数说明 IF EXISTS 如果指定的触发器不存在,则发出一个notice而不是抛出一个错误。 trigger_name 要删除的触发器名称。 取值范围:已存在的触发器。 table_name 要删除的触发器所在的表名称。 取值范围:已存在的含触发器的表。 CASCADE | RESTRICT CASCADE:级联删除依赖此触发器的对象。 RESTRICT:如果有依赖对象存在,则拒绝删除此触发器。此选项为缺省值。
  • STAT_ALL_TABLES 本节点内数据库中每个表的一行(包括TOAST表)的统计信息。 表1 STAT_ALL_TABLES字段 名称 类型 描述 relid oid 表的OID。 schemaname name 该表的模式名。 relname name 表名。 seq_scan bigint 该表发起的顺序扫描数。 seq_tup_read bigint 顺序扫描抓取的活跃行数。 idx_scan bigint 该表发起的索引扫描数。 idx_tup_fetch bigint 索引扫描抓取的活跃行数。 n_tup_ins bigint 插入行数。 n_tup_upd bigint 更新行数。 n_tup_del bigint 删除行数。 n_tup_hot_upd bigint HOT更新行数(比如没有更新所需的单独索引)。 n_live_tup bigint 估计活跃行数。 n_dead_tup bigint 估计死行数。 last_vacuum timestamp with time zone 最后一次该表是手动清理的(不计算VACUUM FULL)的时间。 last_autovacuum timestamp with time zone 上次被autovacuum守护进程清理的时间。 last_analyze timestamp with time zone 上次手动分析该表的时间。 last_autoanalyze timestamp with time zone 上次被autovacuum守护进程分析时间。 vacuum_count bigint 该表被手动清理的次数(不计算VACUUM FULL)。 autovacuum_count bigint 该表被autovacuum清理的次数。 analyze_count bigint 该表被手动分析的次数。 autoanalyze_count bigint 该表被autovacuum守护进程分析的次数。 父主题: Object
  • PG_TS_PARSER PG_TS_PARSER系统表包含定义文本解析器的记录。解析器负责分裂输入文本为词位,并且为每个词位分配标记类型。因为解析器必须通过C语言级别的函数实现,所以新解析器必须由数据库系统管理员创建。 表1 PG_TS_PARSER字段 名称 类型 引用 描述 oid oid - 行标识符(隐含字段;必须明确选择)。 prsname name - 文本搜索解析器名。 prsnamespace oid PG_NAMESPACE.oid 包含这个解析器的名称空间的OID。 prsstart regproc PG_PROC.proname 解析器的启动函数名。 prstoken regproc PG_PROC.proname 解析器的下一个标记函数名。 prsend regproc PG_PROC.proname 解析器的关闭函数名。 prsheadline regproc PG_PROC.proname 解析器的标题函数名。 prslextype regproc PG_PROC.proname 解析器的lextype函数名。 父主题: 系统表
  • audit_login_logout 参数说明:这个参数决定是否审计GaussDB用户的登录(包括登录成功和登录失败)、注销。 该参数属于SIGHUP类型参数,请参考表1中对应设置方法进行设置。 取值范围:整型,0~7。 0表示关闭用户登录、注销审计功能。 1表示只审计用户登录成功。 2表示只审计用户登录失败。 3表示只审计用户登录成功和失败。 4表示只审计用户注销。 5表示只审计用户注销和登录成功。 6表示只审计用户注销和登录失败。 7表示审计用户登录成功、失败和注销。 默认值:7 DN不会对来自CN的登录、注销行为进行审计。
  • ADM_SCHEDULER_JOBS ADM_SCHEDULER_JOBS视图显示数据库中所有DBE_SCHEDULER定时任务的信息。 表1 ADM_SCHEDULER_JOBS字段 名称 类型 描述 owner name 定时任务所有者。 job_name text 定时任务名。 job_style text 定时任务行为模式。 job_creator name 定时任务创建者。 program_name text 定时任务引用的程序名称。 job_action text 定时任务的程序内容。 number_of_arguments text 定时任务的参数个数。 schedule_name text 定时任务引用的调度名称。 start_date timestamp without time zone 定时任务的起始时间。 repeat_interval text 定时任务的任务周期。 end_date timestamp without time zone 定时任务的失效时间。 job_class text 定时任务所属的定时任务类名称。 enabled boolean 定时任务的启用状态。 auto_drop text 定时任务的自动删除功能状态。 state "char" 定时任务的状态。 failure_count smallint 定时任务失败次数统计。 last_start_date timestamp without time zone 定时任务上次拉起时间。 next_run_date timestamp without time zone 定时任务下次执行时间。 destination text 定时任务目标名称。 credential_name text 定时任务证书名称。 comments text 定时任务备注。 父主题: 系统视图
  • OS_THREADS 提供当前节点下所有线程的状态信息。 表1 OS_THREADS字段 名称 类型 描述 node_name text 当前节点的名称。 pid bigint 当前节点进程中正在运行的线程号。 lwpid integer 与pid对应的轻量级线程号。 thread_name text 与pid对应的线程名称。 creation_time timestamp with time zone 与pid对应的线程创建的时间。 父主题: OS
  • GLOBAL_STAT_XACT_USER_TABLES 显示各节点命名空间中用户表的事务状态信息。 表1 GLOBAL_STAT_XACT_USER_TABLES字段 名称 类型 描述 node_name name 节点名称。 relid oid 表的OID。 schemaname name 该表的模式名。 relname name 表名。 seq_scan bigint 该表发起的顺序扫描数。 seq_tup_read bigint 顺序扫描抓取的活跃行数。 idx_scan bigint 该表发起的索引扫描数。 idx_tup_fetch bigint 索引扫描抓取的活跃行数。 n_tup_ins bigint 插入行数。 n_tup_upd bigint 更新行数。 n_tup_del bigint 删除行数。 n_tup_hot_upd bigint HOT更新行数(比如没有更新所需的单独索引)。 父主题: Object
  • PG_AUTH_HISTORY PG_AUTH_HISTORY系统表记录了角色的认证历史。需要有系统管理员权限才可以访问此系统表。 表1 PG_AUTH_HISTORY字段 名称 类型 描述 oid oid 行标识符(隐含属性,必须明确选择)。 roloid oid 角色标识。 passwordtime timestamp with time zone 创建和修改密码的时间。 rolpassword text 角色密码密文,加密方式由GUC参数password_encryption_type确定。 父主题: 系统表
  • 原型 1 2 3 4 SQLRETURN SQLSetConnectAttr(SQLHDBC ConnectionHandle SQLINTEGER Attribute, SQLPOINTER ValuePtr, SQLINTEGER StringLength);
  • 参数 表1 SQLSetConnectAttr参数 关键字 参数说明 ConnectionHandle 连接句柄。 Attribute 设置属性。 ValuePtr 指向对应Attribute的值。依赖于Attribute的值,ValuePtr是32位无符号整型值或指向以空结束的字符串。注意,如果ValuePtr参数是驱动程序指定值。ValuePtr可能是有符号的整数。 StringLength 如果ValuePtr指向字符串或二进制缓冲区,这个参数是*ValuePtr长度,如果ValuePtr指向整型,忽略StringLength。
  • global_streaming_hadr_rto_and_rpo_stat global_streaming_hadr_rto_and_rpo_stat视图显示流式容灾的主数据库实例和备数据库实例日志流控信息(只可在主数据库实例的主DN使用,备DN以及备数据库实例上均不可获取到统计信息)。 表1 global_streaming_hadr_rto_and_rpo_stat参数说明 参数 类型 描述 hadr_sender_node_name text 节点的名称,包含主数据库实例和备数据库实例首备。 hadr_receiver_node_name text 备数据库实例首备名称。 current_rto int 流控的信息,当前主备数据库实例的日志rto时间(单位:秒)。 target_rto int 流控的信息,目标主备数据库实例间的rto时间(单位:秒)。 current_rpo int 流控的信息,当前主备数据库实例的日志rpo时间(单位:秒)。 target_rpo int 流控的信息,目标主备数据库实例间的rpo时间(单位:秒)。 rto_sleep_time int RTO流控信息,为了达到目标rto,预期主机walsender所需要的睡眠时间(单位:微秒)。 rpo_sleep_time int RPO流控信息,为了达到目标rpo,预期主机xlogInsert所需要的睡眠时间(单位:微秒)。 父主题: RTO & RPO
  • PG_RLSPOLICIES PG_RLSPOLICIES视图显示行级访问控制策略的信息。初始化用户和具有sysadmin属性的用户可以查看全部的策略信息,其他用户只能查看自己所拥有表上的策略信息。 表1 PG_RLSPOLICIES字段 名称 类型 描述 schemaname name 行级访问控制策略作用的表对象所属模式名称。 tablename name 行级访问控制策略作用的表对象名称。 policyname name 行级访问控制策略名称。 policypermissive text 行级访问控制策略的表达式拼接方式。取值范围: PERMISSIVE:宽容性策略,用OR表达式拼接。 RESTRICTIVE:限制性策略,用AND表达式拼接。 policyroles name[] 行级访问控制策略影响的用户列表,不指定表示影响所有的用户。 policycmd text 行级访问控制策略影响的SQL操作。 policyqual text 行级访问控制策略的表达式。 父主题: 系统视图
  • PG_STAT_XACT_USER_FUNCTIONS PG_STAT_XACT_USER_FUNCTIONS视图包含每个函数的执行的统计信息。 表1 PG_STAT_XACT_USER_FUNCTIONS字段 名称 类型 描述 funcid oid 函数标识。 schemaname name 模式的名称。 funcname name 函数名称。 calls bigint 函数被调用的次数。 total_time double precision 函数的总执行时长。 self_time double precision 当前线程调用函数的总的时长。 父主题: 系统视图
  • 序列号生成函数 generate_series(start, stop) 描述:生成一个数值序列,从start到stop,步长为1。 参数类型:int、bigint、numeric 返回值类型:setof int、setof bigint、setof numeric(与参数类型相同) generate_series(start, stop, step) 描述:生成一个数值序列,从start到stop,步长为step。 参数类型:int、bigint、numeric 返回值类型:setof int、setof bigint、setof numeric(与参数类型相同) generate_series(start, stop, step interval) 描述:生成一个数值序列,从start到stop,步长为step。 参数类型:timestamp或timestamp with time zone 返回值类型:setof timestamp或setof timestamp with time zone(与参数类型相同)
  • 下标生成函数 generate_subscripts(array anyarray, dim int) 描述:生成一系列包括给定数组的下标。 返回值类型:setof int generate_subscripts(array anyarray, dim int, reverse boolean) 描述:生成一系列包括给定数组的下标。当reverse为真时,该系列则以相反的顺序返回。 返回值类型:setof int
  • 参数说明 param表示参数名。 value表示参数的取值。 目前支持使用Hint设置生效的参数有 布尔类: enable_bitmapscan, enable_hashagg, enable_hashjoin, enable_indexscan, enable_indexonlyscan, enable_material, enable_mergejoin, enable_nestloop, enable_index_nestloop, enable_seqscan, enable_sort, enable_tidscan 整型类: query_dop 浮点类: cost_weight_index, default_limit_rows, seq_page_cost, random_page_cost, cpu_tuple_cost, cpu_index_tuple_cost, cpu_operator_cost, effective_cache_size 设置不在白名单中的参数,参数取值不合法,或hint语法错误时,不会影响查询执行的正确性。使用explain(verbose on)执行可以看到hint解析错误的报错提示。 GUC参数的hint只在最外层查询生效——子查询内的GUC参数hint不生效。 视图定义内的GUC参数hint不生效。 CREATE TABLE ... AS ... 查询最外层的GUC参数hint可以生效。
  • DBE_PLDEBUGGER.info_code debug端调试过程中,调用info_code,查看指定存储过程的源语句和各行对应的行号,行号从函数体开始,函数头部分行号为空。 表1 info_code入参和返回值列表 名称 类型 描述 funcoid IN oid 函数ID lineno OUT integer 行号 query OUT text 源语句 canbreak OUT bool 当前行是否支持断点 父主题: DBE_PLDEBUGGER Schema
  • 内核错误信息 ER RMS G: "unsupported syntax: ENCRYPTED WITH in this operation" SQLSTATE: 42601 CAUSE: "client encryption feature is not supported this operation." ACTION: "Check client encryption feature whether supported this operation." ERRMSG: "invalid grant operation" SQLSTATE: 0LP01 CAUSE: "Grant options cannnot be granted to public." ACTION: "Grant grant options to roles." ERRMSG: "unrecognized object kind: %d" SQLSTATE: XX004 CAUSE: "The object type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "unrecognized GrantStmt.targtype: %d" SQLSTATE: XX004 CAUSE: "The target type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported target types." ERRMSG: "invalid grant operation" SQLSTATE: 0LP01 CAUSE: "Grant to public operation is forbidden in security mode." ACTION: "Don't grant to public in security mode." ERRMSG: "unrecognized object type" SQLSTATE: XX004 CAUSE: "The object type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "invalid grant/revoke operation" SQLSTATE: 0LP01 CAUSE: "Column privileges are only valid for relations in GRANT/REVOKE." ACTION: "Use the column privileges only for relations." ERRMSG: "invalid AccessPriv node" SQLSTATE: 0LP01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "unrecognized GrantStmt.objtype: %d" SQLSTATE: XX004 CAUSE: "The object type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "undefined client master key" SQLSTATE: 42705 CAUSE: "The client master key does not exist." ACTION: "Check whether the client master key exists." ERRMSG: "undefined column encryption key" SQLSTATE: 42705 CAUSE: "The column encryption key does not exist." ACTION: "Check whether the column encryption key exists." ERRMSG: "large object %u does not exist" SQLSTATE: 42704 CAUSE: "The large object does not exist." ACTION: "Check whether the large object exists." ERRMSG: "redundant options" SQLSTATE: 42601 CAUSE: "The syntax 'schemas' is redundant in ALTER DEFAULT PRIVILEGES statement." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." ERRMSG: "redundant options" SQLSTATE: 42601 CAUSE: "The syntax 'roles' is redundant in ALTER DEFAULT PRIVILEGES statement." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." ERRMSG: "option '%s' not recognized" SQLSTATE: 42601 CAUSE: "The option in ALTER DEFAULT PRIVILEGES statement is not supported." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." ERRMSG: "unrecognized GrantStmt.objtype: %d" SQLSTATE: XX004 CAUSE: "The object type is not supported for ALTER DEFAULT PRIVILEGES." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax to obtain the supported object types." ERRMSG: "invalid alter default privileges operation" SQLSTATE: 0LP01 CAUSE: "Default privileges cannot be set for columns." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax." ERRMSG: "unrecognized objtype: %d" SQLSTATE: XX004 CAUSE: "The object type is not supported for default privileges." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax to obtain the supported object types." ERRMSG: "could not find tuple for default ACL %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "unexpected default ACL type: %d" SQLSTATE: 0LP01 CAUSE: "The object type is not supported for default privilege." ACTION: "Check ALTER DEFAULT PRIVILEGES syntax to obtain the supported object types." ERRMSG: "invalid object id" SQLSTATE: 0LP01 CAUSE: "The object type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "undefined column" SQLSTATE: 42703 CAUSE: "The column of the relation does not exist." ACTION: "Check whether the column exists." ERRMSG: "column number out of range" SQLSTATE: 0LP01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for attribute %d of relation %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for relation %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "unsupported object type" SQLSTATE: 42809 CAUSE: "Index type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "unsupported object type" SQLSTATE: 42809 CAUSE: "Composite type is not supported for GRANT/REVOKE." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "wrong object type" SQLSTATE: 42809 CAUSE: "GRANT/REVOKE SEQUENCE only support sequence objects." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "invalid privilege type USAGE for table" SQLSTATE: 0LP01 CAUSE: "GRANT/REVOKE TABLE do not support USAGE privilege." ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types for tables." ERRMSG: "invalid privilege type %s for column" SQLSTATE: 0LP01 CAUSE: "The privilege type is not supported for column object." ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types for column object." ERRMSG: "cache lookup failed for database %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for foreign-data wrapper %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for foreign server %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for function %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for language %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "Grant/revoke on untrusted languages if forbidden." SQLSTATE: 0LP01 CAUSE: "Grant/revoke on untrusted languages if forbidden." ACTION: "Support grant/revoke on trusted C languages" ERRMSG: "cache lookup failed for large object %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for namespace %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for tablespace %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for type %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cannot set privileges of array types" SQLSTATE: 0LP01 CAUSE: "Cannot set privileges of array types." ACTION: "Set the privileges of the element type instead." ERRMSG: "wrong object type" SQLSTATE: 42809 CAUSE: "GRANT/REVOKE DOMAIN only support domain objects." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "cache lookup failed for client master key %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for column encryption key %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "cache lookup failed for directory %u" SQLSTATE: 29P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "unrecognized privilege type '%s'" SQLSTATE: 42601 CAUSE: "The privilege type is not supported." ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types." ERRMSG: "unrecognized privilege: %d" SQLSTATE: XX004 CAUSE: "The privilege type is not supported." ACTION: "Check GRANT/REVOKE syntax to obtain the supported privilege types." ERRMSG: "unrecognized AclResult" SQLSTATE: XX004 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "permission denied for column '%s' of relation '%s'" SQLSTATE: 42501 CAUSE: "Insufficient privileges for the column." ACTION: "Select the system tables to get the acl of the column." ERRMSG: "role with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "unrecognized objkind: %d" SQLSTATE: XX004 CAUSE: "The object type is not supported for privilege check." ACTION: "Check GRANT/REVOKE syntax to obtain the supported object types." ERRMSG: "attribute %d of relation with OID %u does not exist" SQLSTATE: 42703 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "the column has been dropped" SQLSTATE: 42703 CAUSE: "The column does not exist." ACTION: "Check whether the column exists." ERRMSG: "relation with OID %u does not exist" SQLSTATE: 42P01 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "invalid group" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "database with OID %u does not exist" SQLSTATE: 3D000 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "directory with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "function with OID %u does not exist" SQLSTATE: 42883 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "client master key with OID %u does not exist" SQLSTATE: 42705 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "language with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "large object %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "schema with OID %u does not exist" SQLSTATE: 3F001 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "tablespace with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "foreign-data wrapper with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "foreign server with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "type with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "operator with OID %u does not exist" SQLSTATE: 42883 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "column encryption key with OID %u does not exist" SQLSTATE: 42705 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "operator class with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "operator family with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "text search dictionary with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "text search configuration with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "collation with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "conversion with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "synonym with OID %u does not exist" SQLSTATE: 42704 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "package can not create the same name with schema." SQLSTATE: 22023 CAUSE: "Package name conflict" ACTION: "Please rename package name" ERRMSG: "type is not exists %s." SQLSTATE: 22023 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "This input type is not supported for tdigest_in()" SQLSTATE: 0A000 CAUSE: "input type is not supported" ACTION: "Check tdigest_in syntax to obtain the supported privilege types" ERRMSG: "Failed to apply for memory" SQLSTATE: 53200 CAUSE: "palloc failed" ACTION: "Check memory" ERRMSG: "Failed to get tde info from relation '%s'." SQLSTATE: XX005 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "SPI_connect failed: %s" SQLSTATE: SP001 CAUSE: "System error." ACTION: "Analyze the error message before the error" ERRMSG: "permission denied for terminate snapshot thread" SQLSTATE: 42501 CAUSE: "The user does not have system admin privilege" ACTION: "Grant system admin to user" ERRMSG: "terminate snapshot thread failed" SQLSTATE: OP001 CAUSE: "Execution failed due to: %s" ACTION: "check if snapshot thread exists" ERRMSG: "terminate snapshot thread failed" SQLSTATE: OP001 CAUSE: "restart wdr snapshot thread timeoutor The thread did not respond to the kill signal" ACTION: "Check the wdr snapshot thread is restarted" ERRMSG: "set lockwait_timeout failed" SQLSTATE: XX000 CAUSE: "System error." ACTION: "Contact engineer to support." ERRMSG: "permission denied for create WDR Snapshot" SQLSTATE: 42501 CAUSE: "The user does not have system admin privilege" ACTION: "Grant system admin to user" ERRMSG: "WDR snapshot request can not be accepted, please retry later" SQLSTATE: OP001 CAUSE: "wdr snapshot thread does not exist" ACTION: "Check if wdr snapshot thread exists" ERRMSG: "Cannot respond to WDR snapshot request" SQLSTATE: OP001 CAUSE: "Execution failed due to: %s" ACTION: "Check if wdr snapshot thread exists" ERRMSG: "query(%s) can not get datum values" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "create sequence failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check if sequence can be created" ERRMSG: "update snapshot end time stamp filled" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "query can not get datum values" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "SPI_connect failed: %s" SQLSTATE: XX000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "query(%s) execute failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "clean table of snap_%s is failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "analyze table failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "insert into tables_snap_timestamp start time stamp is failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "insert data failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful and check whether the query can be executed" ERRMSG: "update tables_snap_timestamp end time stamp is failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "clean snapshot id %lu is failed in snapshot table" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful and check whether the query can be executed" ERRMSG: "clean snapshot failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "can not create snapshot stat table" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "create WDR snapshot data table failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "insert into tables_snap_timestamp start time stamp failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "insert into snap_%s is failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "update tables_snap_timestamp end time stamp failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "create index failed" SQLSTATE: 22000 CAUSE: "System error." ACTION: "Check whether the query can be executed" ERRMSG: "analyze table, connection failed: %s" SQLSTATE: XX000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "snapshot thread SPI_connect failed: %s" SQLSTATE: XX000 CAUSE: "System error." ACTION: "Check whether the snapshot retry is successful" ERRMSG: "Distributed key column can't be transformed" SQLSTATE: 42P10 CAUSE: "There is a risk of violating uniqueness when transforming distribution columns." ACTION: "Change transform column." ERRMSG: "cannot convert %s to %s" SQLSTATE: 42804 CAUSE: "There is no conversion path in pg_cast." ACTION: "Rewrite or cast the expression." ERRMSG: "create matview on TDE table failed" SQLSTATE: 0A000 CAUSE: "create materialized views is not supported on TDE table" ACTION: "check CREATE syntax about create the materialized views" ERRMSG: "schema name can not same as package" SQLSTATE: 22023 CAUSE: "schema name conflict" ACTION: "rename schema name" ERRMSG: "Unrecognized commandType when checking read-only attribute." SQLSTATE: XX004 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Fail to generate subquery plan." SQLSTATE: XX005 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Unrecognized node type when processing qual condition." SQLSTATE: XX004 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Unrecognized node type when processing const parameters." SQLSTATE: XX004 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "SELECT FOR UPDATE/SHARE is not allowed with UNION/INTERSECT/EXCEPT" SQLSTATE: 0A000 CAUSE: "SQL uses unsupported feature." ACTION: "Modify SQL statement according to the manual." ERRMSG: "GROUP BY cannot be implemented." SQLSTATE: 0A000 CAUSE: "GROUP BY uses unsupported datatypes." ACTION: "Modify SQL statement according to the manual." ERRMSG: "TSDB functions cannot be used if enable_tsdb is off." SQLSTATE: D0011 CAUSE: "Functions are not loaded." ACTION: "Turn on enable_tsdb according to manual." ERRMSG: "Unrecognized node type when extracting index." SQLSTATE: XX004 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Ordering operator cannot be identified." SQLSTATE: 42883 CAUSE: "Grouping set columns must be able to sort their inputs." ACTION: "Modify SQL statement according to the manual." ERRMSG: "DISTINCT cannot be implemented." SQLSTATE: 0A000 CAUSE: "DISTINCT uses unsupported datatypes." ACTION: "Modify SQL statement according to the manual." ERRMSG: "Failed to locate grouping columns." SQLSTATE: 55000 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Resjunk output columns are not implemented." SQLSTATE: 20000 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "PARTITION BY cannot be implemented." SQLSTATE: 0A000 CAUSE: "PARTITION BY uses unsupported datatypes." ACTION: "Modify SQL statement according to the manual." ERRMSG: "ORDER BY cannot be implemented." SQLSTATE: 0A000 CAUSE: "ORDER BY uses unsupported datatypes." ACTION: "Modify SQL statement according to the manual." ERRMSG: "Failed to deconstruct sort operators into partitioning/ordering operators." SQLSTATE: D0011 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Pool size should not be zero" SQLSTATE: 22012 CAUSE: "Compute pool configuration file contains error." ACTION: "Please check the value of 'pl' in cp_client.conf." ERRMSG: "Failed to get the runtime info from the compute pool." SQLSTATE: 22004 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "Version is not compatible between local cluster and the compute pool." SQLSTATE: XX008 CAUSE: "Compute pool is not installed appropriately." ACTION: "Configure compute pool according to manual." ERRMSG: "No optional index path is found." SQLSTATE: 01000 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "MERGE INTO on replicated table does not yet support using distributed tables." SQLSTATE: 0A000 CAUSE: "SQL uses unsupported feature." ACTION: "Modify SQL statement according to the manual." ERRMSG: "Fail to find ForeignScan node!" SQLSTATE: P0002 CAUSE: "System error." ACTION: "Contact Huawei Engineer." ERRMSG: "sql advisor don't support none table, temp table, system table." SQLSTATE: 42601 CAUSE: "sql advisor don't support none table, temp table, system table." ACTION: "check query component" ERRMSG: "Invalid autonomous transaction return datatypes" SQLSTATE: P0000 CAUSE: "PL/SQL uses unsupported feature." ACTION: "Contact Huawei Engineer." ERRMSG: "new row for relation '%s' violates check constraint '%s'" SQLSTATE: 23514 CAUSE: "some rows copy failed" ACTION: "check table defination" ERRMSG: "new row for relation '%s' violates check constraint '%s'" SQLSTATE: 23514 CAUSE: "some rows copy failed" ACTION: "set client_min_messages = info for more details" ERRMSG: "get gauss home path is NULL" SQLSTATE: XX005 CAUSE: "gauss home path not set" ACTION: "check if $GAUSSHOME is exist" ERRMSG: "unable to open kms_iam_info.json file" SQLSTATE: 58P03 CAUSE: "file not exist or broken" ACTION: "check the kms_iam_info.json file" ERRMSG: "can not get password plaintext" SQLSTATE: XX005 CAUSE: "file not exist or broken" ACTION: "check the password cipher rand file" ERRMSG: " IAM info json key is NULL" SQLSTATE: XX005 CAUSE: "IAM info value error" ACTION: "check tde_config kms_iam_info.json file" ERRMSG: "get internal password is NULL" SQLSTATE: XX005 CAUSE: "cipher rand file missing" ACTION: "check password cipher rand file" ERRMSG: "KMS info json key is NULL" SQLSTATE: XX005 CAUSE: "KMS info value error" ACTION: "check tde_config kms_iam_info.json file" ERRMSG: "unable to get json file" SQLSTATE: 58P03 CAUSE: "parse json file failed" ACTION: "check the kms_iam_info.json file format" ERRMSG: "get JSON tree is NULL" SQLSTATE: XX005 CAUSE: "get KMS JSON tree failed" ACTION: "check input pararmeter or config.ini file" ERRMSG: "failed to get json tree" SQLSTATE: XX005 CAUSE: "config.ini json tree error" ACTION: "check input pararmeter or config.ini file" ERRMSG: "failed to set the value of json tree" SQLSTATE: XX005 CAUSE: "config.ini json tree error" ACTION: "check input pararmeter or config.ini file" ERRMSG: "http request failed" SQLSTATE: XX005 CAUSE: "http request error" ACTION: "check KMS or IAM connect or config parameter" ERRMSG: "get iam token or iam agency token is NULL" SQLSTATE: XX005 CAUSE: "connect IAM failed" ACTION: "check if your env can connect with IAM server" ERRMSG: "KMS dek json key is NULL" SQLSTATE: XX005 CAUSE: "KMS return value error" ACTION: "check KMS config parameter" ERRMSG: "get kms dek is NULL" SQLSTATE: XX005 CAUSE: "connect KMS failed" ACTION: "check if your env can connect with KMS server" ERRMSG: "get http header is NULL" SQLSTATE: XX005 CAUSE: "http request failed" ACTION: "check IAM config parameter" ERRMSG: "create KMS dek failed" SQLSTATE: XX005 CAUSE: "KMS error" ACTION: "check KMS connect or config parameter" ERRMSG: "get KMS dek failed" SQLSTATE: XX005 CAUSE: "KMS error" ACTION: "check KMS connect or config parameter" ERRMSG: "get KMS DEK is NULL" SQLSTATE: XX005 CAUSE: "get KMS dek_plaintext failed" ACTION: "check KMS network or cipher is right" ERRMSG: "create matview with TDE failed" SQLSTATE: 0A000 CAUSE: "TDE feature is not supported for Create materialized views" ACTION: "check CREATE syntax about create the materialized views" ERRMSG: "failed to add item to the index page" SQLSTATE: XX002 CAUSE: "System error." ACTION: "Check WARNINGS for the details." ERRMSG: "index row size %lu exceeds maximum %lu for index '%s'" SQLSTATE: 54000 CAUSE: "Values larger than 1/3 of a buffer page cannot be indexed." ACTION: "Consider a function index of an MD5 hash of the value, or use full text indexing." 父主题: 错误日志信息参考
  • 不支持场景 物化视图中不支持带Stream计划,多表join连接计划以及subquery计划。 除少部分ALTER操作外,不支持对物化视图中基表做绝大多数DDL操作。 创建物化视图不可指定物化视图分布列。 不可对物化视图做增删改操作,只支持查询语句。 不支持用临时表/hashbucket/unlog/分区表创建物化视图,只支持hash分布表。 不支持物化视图嵌套创建(物化视图上创建物化视图)。 仅支持行存表。 不支持UN LOG GED类型的物化视图,不支持WITH语法。
  • PG_RUNNING_XACTS PG_RUNNING_XACTS视图显示当前节点运行事务的信息。 表1 PG_RUNNING_XACTS字段 名称 类型 描述 handle integer 事务在GTM对应的句柄。 gxid xid 事务id号。 state tinyint 事务状态。 3:prepared。 0:starting。 node text 节点名称。 xmin xid 节点上当前数据涉及的最小事务号。 vacuum boolean 表示当前事务是否是lazy vacuum事务。 t(true):表示是。 f(false):表示不是。 timeline bigint 数据库重启次数。 prepare_xid xid 处于prepared状态的事务的id,若事务不在prepared状态,值为0。 pid bigint 事务对应的线程id。 next_xid xid CN传给DN的事务id。 父主题: 系统视图
  • 原型 int PQsendQueryParams(PGconn *conn, const char *command, int nParams, const Oid *paramTypes, const char * const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat);
  • 示例 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 --创建一个表tb_for_label。 openGauss=# CREATE TABLE tb_for_label(col1 text, col2 text, col3 text); --创建一个模式schema_for_label。 openGauss=# CREATE SCHEMA schema_for_label; --创建一个视图view_for_label。 openGauss=# CREATE VIEW view_for_label AS SELECT 1; --创建一个函数func_for_label。 openGauss=# CREATE FUNCTION func_for_label RETURNS TEXT AS $$ SELECT col1 FROM tb_for_label; $$ LANGUAGE SQL; --基于表创建资源标签。 openGauss=# CREATE RESOURCE LABEL IF NOT EXISTS table_label add TABLE(public.tb_for_label); --基于列创建资源标签。 openGauss=# CREATE RESOURCE LABEL IF NOT EXISTS column_label add COLUMN(public.tb_for_label.col1); --基于模式创建资源标签。 openGauss=# CREATE RESOURCE LABEL IF NOT EXISTS schema_label add SCHEMA(schema_for_label); --基于视图创建资源标签。 openGauss=# CREATE RESOURCE LABEL IF NOT EXISTS view_label add VIEW(view_for_label); --基于函数创建资源标签。 openGauss=# CREATE RESOURCE LABEL IF NOT EXISTS func_label add FUNCTION(func_for_label); --删除资源标签。 openGauss=# DROP RESOURCE LABEL func_label, view_label, schema_label, column_label, table_label; --删除函数func_for_label。 openGauss=# DROP FUNCTION func_for_label; --删除视图view_for_label。 openGauss=# DROP VIEW view_for_label; --删除模式schema_for_label。 openGauss=# DROP SCHEMA schema_for_label; --删除表tb_for_label。 openGauss=# DROP TABLE tb_for_label;
  • 参数说明 OR REPLACE 如果视图已存在,则重新定义。 TEMP | TEMPORARY 创建临时视图。 view_name 要创建的视图名称。可以用模式修饰。 取值范围:字符串,符合标识符命名规范。 column_name 可选的名称列表,用作视图的字段名。如果没有给出,字段名取自查询中的字段名。 取值范围:字符串,符合标识符命名规范。 view_option_name [= view_option_value] 该子句为视图指定一个可选的参数。 目前view_option_name支持的参数仅有security_barrier,当VIEW视图提供行级安全时,应使用该参数。 取值范围:Boolean类型,TRUE、FALSE query 为视图提供行和列的SELECT或VALUES语句。 若query包含指定分区表分区的子句,创建视图会将所指定分区的OID硬编码到系统表中。如果使用导致指定分区的OID发生变更的分区DDL语法,如DROP/SPLIT/MERGE该分区,则会导致视图不可用。需要重新创建视图。
  • 示例 --创建字段spcname为pg_default组成的视图。 openGauss=# CREATE VIEW myView AS SELECT * FROM pg_tablespace WHERE spcname = 'pg_default'; --查看视图。 openGauss=# SELECT * FROM myView ; --删除视图myView。 openGauss=# DROP VIEW myView;
共100000条