华为云用户手册

  • connection_info 参数说明:连接数据库的驱动类型、驱动版本号、当前驱动的部署路径和进程属主用户。 该参数属于USERSET类型参数,属于运维类参数,不建议用户设置。 取值范围:字符串。 默认值:空字符串。 空字符串,表示当前连接数据库的驱动不支持自动设置connection_info参数或应用程序未设置。 驱动连接数据库的时候自行拼接的connection_info参数格式如下: 1 {"driver_name":"ODBC","driver_version": "( GaussDB Kernel VxxxRxxxCxx build 290d125f) compiled at 2020-05-08 02:59:43 commit 2143 last mr 131 release","driver_path":"/usr/local/lib/psqlodbcw.so","os_user":"omm"} 默认显示driver_name和driver_version,driver_path和os_user的显示由用户控制。
  • check_disconnect_query 参数说明:当客户端异常断连(如JDBC触发socketTimeout、libpq触发rwtimeout且关闭连接、运行业务过程中客户端进程终止等)后,该参数控制GaussDB服务端语句是否终止执行。 参数类型:布尔型 参数单位:无 取值范围: on:表示当客户端异常断连后,GaussDB服务端终止运行对应的语句。 off:表示当客户端异常断连后,GaussDB服务端不会终止运行对应的语句。 默认值:on 设置方式:该参数属于POSTMASTER类型参数,请参考表1中对应设置方法进行设置。 设置建议:推荐使用默认值。 若设置此参数后执行升级,在升级到其他版本前需检查目标版本是否支持该参数。如果不支持,则在升级前需从配置文件中删除该参数。
  • listen_addresses 参数说明:声明服务器侦听客户端的TCP/IP地址。 该参数指定GaussDB服务器使用哪些IP地址进行侦听,如IPV4。服务器主机上可能存在多个网卡,每个网卡可以绑定多个IP地址,该参数就是控制GaussDB绑定在哪个或者哪几个IP地址上。而客户端则可以通过该参数中指定的IP地址来连接GaussDB或者给GaussDB发送请求。 该参数属于POSTMASTER类型参数,请参考表1中对应设置方法进行设置。 取值范围: 主机名或IP地址,多个值之间用英文逗号分隔。 星号“*”或“0.0.0.0”表示侦听所有IP地址。配置侦听所有IP地址存在安全风险,不推荐用户使用。必须与有效地址结合使用(比如本地IP等),否则,可能造成Build失败的问题。同时,主备环境下配置为“\*”或“0.0.0.0”时,主节点数据库路径下postgresql.conf文件中的localport端口号不能为数据库dataPortBase+1,否则会导致数据库无法启动。 置空则服务器不会侦听任何IP地址,这种情况下,只有UNIX域套接字可以用于连接数据库。 默认值:数据库实例安装好后,根据public_cloud.conf配置文件中不同实例的IP地址配置不同默认值。DN的默认参数值为:listen_addresses = 'data.net网卡对应的IP地址'。 public_cloud.conf文件保存的网卡信息,包括:mgr.net(管理网卡)、data.net(数据网卡)、virtual.net(虚拟网卡)。
  • local_bind_address 参数说明:声明当前节点连接数据库其他节点绑定的本地IP地址。 该参数属于POSTMASTER类型参数,请参考表1中对应设置方法进行设置。 默认值:数据库实例安装好后,根据public_cloud.conf配置文件中不同实例的IP地址配置不同默认值。DN的默认参数值为:local_bind_address = 'data.net网卡对应的IP地址'。 public_cloud.conf文件保存的网卡信息,包括:mgr.net(管理网卡)、data.net(数据网卡)、virtual.net(虚拟网卡)
  • unix_socket_directory 参数说明:设置GaussDB服务器侦听客户端连接的UNIX域套接字目录。 该参数属于POSTMASTER类型参数,请参考表1中对应设置方法进行设置。 该参数的长度限制于操作系统的长度,超过该限制将会导致Unix-domain socket path "xxx" is too long的问题。 取值范围:字符串 默认值:空字符串(实际值由安装时配置文件指定)
  • sysadmin_reserved_connections 参数说明:为管理员用户预留的最少连接数,不建议设置过大。该参数和max_connections参数配合使用,管理员用户的最大连接数等于max_connections + sysadmin_reserved_connections。 该参数属于POSTMASTER类型参数,请参考表1中对应设置方法进行设置。 取值范围:整型,最小值为0,最大值为MIN(262143, max_connections),max_connections的计算方法见上文。 默认值:3 注意:当启用线程池功能时,若线程池占满将形成处理瓶颈,导致管理员预留连接无法正常建立;作为逃生手段,此时可使用gsql通过主端口+1端口号连入,清理无用会话,即可正常连入。
  • max_inner_tool_connections 参数说明:允许和数据库连接的工具的最大并发连接数。此参数会影响GaussDB的工具连接并发能力。 该参数属于POSTMASTER类型参数,请参考表1中对应设置方法进行设置。 取值范围:整型,最小值为1,最大值为MIN(262143, max_connections),max_connections的计算方法见上文。 默认值:数据库节点为50。如果该默认值超过内核支持的最大值(在执行gs_initdb的时候判断),系统会提示错误。 设置建议: 数据库主节点中此参数建议保持默认值。 增大此参数可能导致GaussDB要求更多的SystemV共享内存或者信号量,可能超过操作系统缺省配置的最大值。这种情况下,请酌情对数值加以调整。
  • unix_socket_permissions 参数说明:设置UNIX域套接字的访问权限。 UNIX域套接字使用普通的UNIX文件系统权限集。这个参数的值应该是数值的格式(chmod和umask命令可接受的格式)。如果使用自定义的八进制格式,数字必须以0开头。 建议设置为0770(只有当前连接数据库的用户和同组的人可以访问)或者0700(只有当前连接数据库的用户自己可以访问,同组或者其他人都没有权限)。 该参数属于POSTMASTER类型参数,请参考表1中对应设置方法进行设置。 取值范围:0000-0777 默认值:0700 在Linux中,文档具有十个属性,其中第一个属性为文档类型,后面九个为权限属性,分别为Owner,Group及Others这三个组别的read、write、execute属性。 文档的权限属性分别简写为r,w,x,这九个属性三个为一组,也可以使用数字来表示文档的权限,对照表如下: r:4 w: 2 x:1 -:0 同一组(owner/group/others)的三个属性是累加的。 例如,-rwxrwx---表示这个文档的权限为: owner = rwx = 4+2+1 = 7 group = rwx = 4+2+1 = 7 others = --- = 0+0+0 = 0 所以其权限为0770。
  • port 参数说明:GaussDB服务侦听的TCP端口号。 该参数属于POSTMASTER类型参数,请参考表1中对应设置方法进行设置。 该参数由安装时的配置文件指定,请勿轻易修改,否则修改后会影响数据库正常通信。 取值范围:整型,1~65535 设置端口号时,请设置一个未被占用的端口号。设置多个实例的端口号,不可冲突。 1~1023为操作系统保留端口号,请不要使用。 通过配置文件安装数据库实例时,配置文件中的端口号需要注意通信矩阵预留端口。如:DN还需保留dataPortBase+1作为内部工具使用端口,保留dataPortBase+6作为流引擎(由于规格变更,当前版本已经不再支持本特性,请不要使用)消息队列通信端口等。故数据库实例安装阶段,port最大值为:DN可设置65529,同时需要保证端口号不冲突。 默认值:5432(实际值由安装时的配置文件指定)
  • 示例 示例1:使用方式一修改 GaussDB数据库 主节点的最大连接数。 以操作系统用户omm登录数据库主节点。 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 查看最大连接数。 1 2 3 4 5 openGauss=# SHOW max_connections; max_connections ----------------- 200 (1 row) 使用如下命令退出数据库。 1 openGauss=# \q 修改GaussDB数据库主节点的最大连接数。 gs_guc set -Z datanode -N all -I all -c "max_connections = 800" 重启数据库。 gs_om -t stop && gs_om -t start 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 查看最大连接数。 1 2 3 4 5 openGauss=# SHOW max_connections; max_connections ----------------- 800 (1 row) 示例2:使用方式二设置数据库主节点的客户端认证最长时间参数“authentication_timeout” 以操作系统用户omm登录数据库主节点。 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 查看客户端认证的最长时间。 1 2 3 4 5 openGauss=# SHOW authentication_timeout; authentication_timeout ------------------------ 1min (1 row) 使用如下命令退出数据库。 1 openGauss=# \q 修改数据库主节点的客户端认证最长时间。 gs_guc reload -Z datanode -N all -I all -c "authentication_timeout = 59s" 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 查看客户端认证的最长时间。 1 2 3 4 5 openGauss=# SHOW authentication_timeout; authentication_timeout ------------------------ 59s (1 row) 示例3:修改GaussDB数据库节点的最大连接数。 以操作系统用户omm登录数据库主节点。 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 查看最大连接数。 1 2 3 4 5 openGauss=# SHOW max_connections; max_connections ----------------- 200 (1 row) 使用如下命令退出数据库。 1 openGauss=# \q 修改GaussDB数据库节点的最大连接数。 gs_guc set -Z datanode -N all -I all -c "max_connections = 500" 重启数据库。 gs_om -t stop gs_om -t start 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 查看最大连接数。 1 2 3 4 5 openGauss=# SHOW max_connections; max_connections ----------------- 500 (1 row) 示例4:设置数据库节点的客户端认证最长时间参数“authentication_timeout” 以操作系统用户omm登录数据库主节点。 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 查看客户端认证的最长时间。 1 2 3 4 5 openGauss=# SHOW authentication_timeout; authentication_timeout ------------------------ 1min (1 row) 使用如下命令退出数据库。 1 openGauss=# \q 修改GaussDB数据库节点的客户端认证最长时间。 gs_guc reload -Z datanode -N all -I all -c "authentication_timeout = 30s" 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 查看客户端认证的最长时间。 1 2 3 4 5 openGauss=# SHOW authentication_timeout; authentication_timeout ------------------------ 30s (1 row)
  • 操作步骤 使用方式一设置数据库参数,以在数据库主节点设置hot_standby参数为例。 以操作系统用户omm登录数据库主节点。 查看hot_standby参数。 1 cat /gaussdb/data/dbnode/postgresql.conf | grep "hot_standby" hot_standby = on on表示日志要进行归档操作。 设置hot_standby参数为off,关闭日志的归档操作。 gs_guc set -Z datanode -D /gaussdb/data/dbnode -c "hot_standby=off" 可以使用以下命令在数据库节点上设置hot_standby参数为off。 gs_guc set -Z datanode -N all -I all -c "hot_standby=off" 重启数据库使参数生效。 gs_om -t stop && gs_om -t start 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 检查参数设置的正确性。 1 2 3 4 5 openGauss=# SHOW hot_standby; hot_standby -------------- off (1 row) 使用方式二设置参数,以在数据库主节点设置authentication_timeout参数为例。 以操作系统用户omm登录数据库主节点。 查看authentication_timeout参数。 1 cat /gaussdb/data/dbnode/postgresql.conf | grep authentication_timeout authentication_timeout = 1min 设置authentication_timeout参数为59s。 gs_guc reload -Z datanode -N all -I all -c "authentication_timeout = 59s" Total instances: 2. Failed instances: 0. Success to perform gs_guc! 可以使用以下命令在数据库节点上设置authentication_timeout参数为59s。 gs_guc reload -Z datanode -N all -I all -c "authentication_timeout = 59s" 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 检查参数设置的正确性。 1 2 3 4 5 openGauss=# SHOW authentication_timeout; authentication_timeout ------------------------ 59s (1 row) 使用方式三设置参数,以设置explain_perf_mode参数为例。 以操作系统用户omm登录数据库主节点。 使用如下命令连接数据库。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 查看explain_perf_mode参数。 1 2 3 4 5 openGauss=# SHOW explain_perf_mode; explain_perf_mode ------------------- normal (1 row) 设置explain_perf_mode参数。 使用以下任意方式进行设置: 设置数据库级别的参数 1 openGauss=# ALTER DATABASE postgres SET explain_perf_mode TO pretty; 当结果显示为如下信息,则表示设置成功。 ALTER DATABASE 在下次会话中生效。 设置用户级别的参数 1 openGauss=# ALTER USER omm SET explain_perf_mode TO pretty; 当结果显示为如下信息,则表示设置成功。 ALTER ROLE 在下次会话中生效。 设置会话级别的参数 1 openGauss=# SET explain_perf_mode TO pretty; 当结果显示为如下信息,则表示设置成功。 SET 检查参数设置的正确性。 1 2 3 4 5 openGauss=# SHOW explain_perf_mode; explain_perf_mode -------------- pretty (1 row)
  • 背景信息 GaussDB提供了多种修改GUC参数的方法,用户可以方便地针对数据库、用户、会话进行设置。 参数名称不区分大小写。 参数取值有整型、浮点型、字符串、布尔型和枚举型五类。 布尔值可以是(on,off)、(true,false)、(yes,no)或者(1,0),且不区分大小写。 枚举类型的取值是在系统表pg_settings的enumvals字段取值定义的。 对于有单位的参数,在设置时请指定单位,否则将使用默认的单位。 参数的默认单位在系统表pg_settings的unit字段定义的。 内存单位有:KB(千字节)、MB(兆字节)和GB(吉字节)。 时间单位:ms(毫秒)、s(秒)、min(分钟)、h(小时)和d(天)。 具体参数说明请参见GUC参数说明。
  • GUC参数设置 GaussDB提供了六类GUC参数,具体分类和设置方式请参考表1: 表1 GUC参数分类 参数类型 说明 设置方式 INTERNAL 固定参数,在创建数据库的时候确定,用户无法修改,只能通过show语法或者pg_settings视图进行查看。 无 POSTMASTER 数据库服务端参数,在数据库启动时确定,可以通过配置文件指定。 支持表2中的方式一。 SIGHUP 数据库全局参数,可在数据库启动时设置或者在数据库启动后,发送指令重新加载。 支持表2中的方式一、方式二。 BACKEND 会话连接参数。在创建会话连接时指定,连接建立后无法修改。连接断掉后参数失效。内部使用参数,不推荐用户设置。 支持表2中的方式一、方式二。 说明: 设置该参数后,下一次建立会话连接时生效。 SUSET 数据库管理员参数。可在数据库启动时、数据库启动后或者数据库管理员通过SQL进行设置。 支持表2中的方式一、方式二或由数据库管理员通过方式三设置。 USERSET 普通用户参数。可被任何用户在任何时刻设置。 支持表2中的方式一、方式二或方式三设置。 GaussDB提供了三种方式来修改GUC参数,具体操作请参考表2: 表2 GUC参数设置方式 序号 设置方法 方式一 登录管理控制台。 在“实例管理”页面,选择指定的实例,单击实例名称,进入实例基本信息页面。 在左侧导航栏单击“参数修改”,进入参数修改页面,在该页面修改参数。 如果需要修改的参数在管理该控制台无法修改,请提前评估风险后再联系客服进行修改。 重启数据库使参数生效。 说明: 重启数据库集群操作会导致用户执行操作中断,请在操作之前规划好合适的执行窗口。 方式二 登录管理控制台。 在“实例管理”页面,选择指定的实例,单击实例名称,进入实例基本信息页面。 在左侧导航栏单击“参数修改”,进入参数修改页面,在该页面修改参数。 如果需要修改的参数在管理该控制台无法修改,请提前评估风险后再联系客服进行修改。 方式三 登录管理控制台。 在“实例管理”页面,选择指定的实例,单击实例名称,进入实例基本信息页面。 在左侧导航栏单击“参数修改”,进入参数修改页面,在该页面修改参数。 如果需要修改的参数在管理该控制台无法修改,请提前评估风险后再联系客服进行修改。 使用方式一和方式二设置参数时,若所设参数不属于当前环境,数据库会提示参数不在支持范围内的相关信息。 使用方式三设置参数时,若参数值为int整型,则会将整数前导零过滤掉,例如SET paraname TO 008192与SET paraname TO 8192效果相同。
  • 操作步骤 使用如下命令连接数据库,具体操作请参考通过gsql连接实例章节。 gsql -d postgres -p 8000 postgres为需要连接的数据库名称,8000为数据库主节点的端口号。 连接成功后,系统显示类似如下信息: gsql((GaussDB Kernel VxxxRxxxCxx build f521c606) compiled at 2021-09-16 14:55:22 commit 2935 last mr 6385 release) Non-SSL connection (SSL connection is recommended when requiring high-security) Type "help" for help. openGauss=# 查看数据库运行参数当前取值。 方法一:使用SHOW命令。 使用如下命令查看单个参数: 1 openGauss=# SHOW server_version; server_version显示数据库版本信息的参数。 使用如下命令查看所有参数: 1 openGauss=# SHOW ALL; 方法二:使用pg_settings视图。 使用如下命令查看单个参数: 1 openGauss=# SELECT * FROM pg_settings WHERE NAME='server_version'; 使用如下命令查看所有参数: 1 openGauss=# SELECT * FROM pg_settings;
  • 获取驱动包 单击此处获取GaussDB驱动包“GaussDB_driver.zip”。 单击此处获取GaussDB驱动包校验包“GaussDB_driver.zip.sha256”。 为了防止软件包在传递过程或存储期间被恶意篡改,下载软件包时需下载对应的校验包对软件包进行校验,校验方法如下: 上传软件包和软件包校验包到虚拟机(Linux操作系统)的同一目录下。 执行如下命令,校验软件包完整性。 cat GaussDB_driver.zip.sha256 | sha256sum --check 如果回显OK,则校验通过。 GaussDB_driver.zip: OK
  • CM报错信息 ER RMS G: "Fail to access the cluster static config file." SQLSTATE: c3000 CAUSE: "The cluster static config file is not generated or is manually deleted." ACTION: "Please check the cluster static config file." ERRMSG: "Fail to open the cluster static file." SQLSTATE: c3000 CAUSE: "The cluster static config file is not generated or is manually deleted." ACTION: "Please check the cluster static config file." ERRMSG: "Fail to read the cluster static file." SQLSTATE: c3001 CAUSE: "The cluster static file permission is insufficient." ACTION: "Please check the cluster static config file." ERRMSG: "Failed to read the static config file." SQLSTATE: c1000 CAUSE: "out of memeory." ACTION: "Please check the system memory and try again." ERRMSG: "Could not find the current node in the cluster by the node id %u." SQLSTATE: c3002 CAUSE: "The static config file probably contained content error." ACTION: "Please check static config file." ERRMSG: "Failed to open the logic config file." SQLSTATE: c3000 CAUSE: "The logic config file is not generated or is manually deleted." ACTION: "Please check the cluster static config file." ERRMSG: "Fail to read the logic static config file." SQLSTATE: c3001 CAUSE: "The logic static config file permission is insufficient." ACTION: "Please check the logic static config file." ERRMSG: "Failed to open or read the static config file." SQLSTATE: c1000 CAUSE: "out of memeory." ACTION: "Please check the system memory and try again." ERRMSG: "Failed to open the log file '%s'." SQLSTATE: c3000 CAUSE: "Log file not found." ACTION: "Please check the log file." ERRMSG: "Failed to open the log file '%s'." SQLSTATE: c3000 CAUSE: "The log file permission is insufficient." ACTION: "please check the log file." ERRMSG: "Failed to open the dynamic config file '%s'." SQLSTATE: c3000 CAUSE: "The dynamic config file permission is insufficient." ACTION: "Please check the dynamic config file." ERRMSG: "Failed to malloc memory, size = %lu." SQLSTATE: c1000 CAUSE: "out of memeory." ACTION: "Please check the system memory and try again." ERRMSG: "unrecognized AZ name '%s'." SQLSTATE: c3000 CAUSE: "The parameter(%s) entered by the user is incorrect." ACTION: "Please check the parameter entered by the user and try again." ERRMSG: "unrecognized minorityAz name '%s'." SQLSTATE: c3000 CAUSE: "The parameter(%s) entered by the user is incorrect." ACTION: "Please check the parameter entered by the user and try again." ERRMSG: "Get GAUSSHOME failed." SQLSTATE: c3000 CAUSE: "The environment variable('GAUSSHOME') is incorrectly configured." ACTION: "Please check the environment variable('GAUSSHOME')." ERRMSG: "Get current user name failed." SQLSTATE: c3000 CAUSE: "N/A" ACTION: "Please check the environment." ERRMSG: "-B option must be specified." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-T option must be specified.\n" SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "can't stop one node or instance with -m normal." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "can't stop one node or instance with -m resume." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "can't stop one availability zone with -m resume." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "log level or cm server arbitration mode must be specified." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "log level or cm server arbitration mode need not be specified." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-R is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-D is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n and -R are needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n and -D are needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "no operation specified." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "no cm directory specified." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "Please check the usage of switchover." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n and -z cannot be specified at the same time." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-m cannot be specified at the same time with -n or -z." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n node(%d) is invalid." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n node is needed." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "%s: -C is needed." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-z value must be 'ALL' when query mppdb cluster." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-v is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-C is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-Cv is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-L value must be 'ALL' when query logic cluster." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "unrecognized LC name '%s'." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n is needed." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "There is no '%s' information in cluster." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-D path is too long.\n" SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-D path is invalid." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-n node(%s) is invalid." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-R only support when the cluster is single-inst." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-t time is invalid." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "-votenum is invalid." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "unrecognized build mode." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "unrecognized build mode '%s'." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "too many command-line arguments (first is '%s')." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "unrecognized operation mode '%s'." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "no cm directory specified." SQLSTATE: c3000 CAUSE: "%s: The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "Failed to malloc memory." SQLSTATE: c1000 CAUSE: "out of memeory." ACTION: "Please check the system memory and try again." ERRMSG: "Failed to open etcd: %s." SQLSTATE: c4000 CAUSE: "Etcd is abnoraml." ACTION: "Please check the Cluster Status and try again." ERRMSG: "[PATCH-ERROR] hotpatch command or path set error." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "no standby datanode in single node cluster." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "restart logic cluster failed." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "restart logic cluster failed" SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." ERRMSG: "The option parameter is not specified." SQLSTATE: c3000 CAUSE: "The cmdline entered by the user is incorrect." ACTION: "Please check the cmdline entered by the user(%s)." 父主题: 错误日志信息参考
  • 内核错误信息 ERRMSG: "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 prarmeter or config.ini file" ERRMSG: "failed to get json tree" SQLSTATE: XX005 CAUSE: "config.ini json tree error" ACTION: "check input prarmeter or config.ini file" ERRMSG: "failed to set the value of json tree" SQLSTATE: XX005 CAUSE: "config.ini json tree error" ACTION: "check input prarmeter 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 paramenter" 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." 父主题: 错误日志信息参考
  • 语法格式 创建增量物化视图 CREATE INCREMENTAL MATERIALIZED VIEW [ view_name ] AS { query_block }; 全量刷新物化视图 REFRESH MATERIALIZED VIEW [ view_name ]; 增量刷新物化视图 REFRESH INCREMENTAL MATERIALIZED VIEW [ view_name ]; 删除物化视图 DROP MATERIALIZED VIEW [ view_name ]; 查询物化视图 SELECT * FROM [ view_name ];
  • 示例 --准备数据。 openGauss=# CREATE TABLE t1(c1 int, c2 int); openGauss=# INSERT INTO t1 VALUES(1, 1); openGauss=# INSERT INTO t1 VALUES(2, 2); --创建增量物化视图。 openGauss=# CREATE INCREMENTAL MATERIALIZED VIEW mv AS SELECT * FROM t1; CREATE MATERIALIZED VIEW --插入数据。 openGauss=# INSERT INTO t1 VALUES(3, 3); INSERT 0 1 --增量刷新物化视图。 openGauss=# REFRESH INCREMENTAL MATERIALIZED VIEW mv; REFRESH MATERIALIZED VIEW --查询物化视图结果。 openGauss=# SELECT * FROM mv; c1 | c2 ----+---- 1 | 1 2 | 2 3 | 3 (3 rows) --插入数据。 openGauss=# INSERT INTO t1 VALUES(4, 4); INSERT 0 1 --全量刷新物化视图。 openGauss=# REFRESH MATERIALIZED VIEW mv; REFRESH MATERIALIZED VIEW --查询物化视图结果。 openGauss=# select * from mv; c1 | c2 ----+---- 1 | 1 2 | 2 3 | 3 4 | 4 (4 rows) --删除物化视图。 openGauss=# DROP MATERIALIZED VIEW mv; DROP MATERIALIZED VIEW
  • 语法格式 创建全量物化视图 CREATE MATERIALIZED VIEW [ view_name ] AS { query_block }; 全量刷新物化视图 REFRESH MATERIALIZED VIEW [ view_name ]; 删除物化视图 DROP MATERIALIZED VIEW [ view_name ]; 查询物化视图 SELECT * FROM [ view_name ];
  • 示例 --准备数据。 openGauss=# CREATE TABLE t1(c1 int, c2 int); openGauss=# INSERT INTO t1 VALUES(1, 1); openGauss=# INSERT INTO t1 VALUES(2, 2); --创建全量物化视图。 openGauss=# CREATE MATERIALIZED VIEW mv AS select count(*) from t1; CREATE MATERIALIZED VIEW --查询物化视图结果。 openGauss=# SELECT * FROM mv; count ------- 2 (1 row) --向物化视图中基表插入数据。 openGauss=# INSERT INTO t1 VALUES(3, 3); INSERT 0 1 --对全量物化视图做全量刷新。 openGauss=# REFRESH MATERIALIZED VIEW mv; REFRESH MATERIALIZED VIEW --查询物化视图结果。 openGauss=# SELECT * FROM mv; count ------- 3 (1 row) --删除物化视图。 openGauss=# DROP MATERIALIZED VIEW mv; DROP MATERIALIZED VIEW
  • 操作步骤 以具有REPLICATION权限的用户登录GaussDB数据库主节点。 使用如下命令连接数据库。 gsql -U user1 -d gaussdb -p 16000 -r 其中,user1为用户名,gaussdb为需要连接的数据库名称,16000为数据库端口号,用户可根据实际情况替换。 创建名称为slot1的逻辑复制槽。 1 2 3 4 5 openGauss=# SELECT * FROM pg_create_logical_replication_slot('slot1', 'mppdb_decoding'); slotname | xlog_position ----------+--------------- slot1 | 0/601C150 (1 row) 在数据库中创建表t,并向表t中插入数据。 1 2 openGauss=# CREATE TABLE t(a int PRIMARY KEY, b int); openGauss=# INSERT INTO t VALUES(3,3); 读取复制槽slot1解码结果,解码条数为4096。 1 2 3 4 5 6 7 8 9 10 openGauss=# SELECT * FROM pg_logical_slot_peek_changes('slot1', NULL, 4096); location | xid | data -----------+-------+------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------- 0/601C188 | 1010023 | BEGIN 1010023 0/601ED60 | 1010023 | COMMIT 1010023 CS N 1010022 0/601ED60 | 1010024 | BEGIN 1010024 0/601ED60 | 1010024 | {"table_name":"public.t","op_type":"INSERT","columns_name":["a","b"],"columns_type":["integer","integer"],"columns_val":["3","3"],"old_keys_name":[],"old_keys_type":[],"old_keys_val":[]} 0/601EED8 | 1010024 | COMMIT 1010024 CSN 1010023 (5 rows) 删除逻辑复制槽slot1。 1 2 3 4 5 openGauss=# SELECT * FROM pg_drop_replication_slot('slot1'); pg_drop_replication_slot -------------------------- (1 row)
  • 并行解码 以下配置选项仅限流式解码设置。 decode-style: 指定解码格式。 取值范围:char型的字符'j'、't'或'b',分别代表json格式,text格式及二进制格式。默认值为'b'即二进制格式解码。 对于json格式和text格式解码,开启批量发送选项时的解码结果中,每条解码语句的前4字节组成的uint32代表该条语句总字节数(不包含该uint32类型占用的4字节,0代表本批次解码结束),8字节uint64代表相应lsn(begin对应first_lsn,commit对应end_lsn,其他场景对应该条语句的lsn)。 二进制格式编码规则如下所示: 前4字节代表接下来到语句级别分隔符字母P(不含)或者该批次结束符F(不含)的解码结果的总字节数,该值如果为0代表本批次解码结束。 接下来8字节uint64代表相应lsn(begin对应first_lsn,commit对应end_lsn,其他场景对应该条语句的lsn)。 接下来1字节的字母有5种B/C/I/U/D,分别代表begin/commit/insert/update/delete。 第3.接下来1字节的字母有5种B/C/I/U/D,...步字母为B时。 接下来的8字节uint64代表CSN。 接下来的8字节uint64代表first_lsn。 【该部分为可选项】接下来的1字节字母如果为T,则代表后面4字节uint32表示该事务commit时间戳长度,再后面等同于该长度的字符为时间戳字符串。 【该部分为可选项】接下来的1字节字母如果为N,则代表后面4字节uint32表示该事务用户名的长度,再后面等同于该长度的字符为事务的用户名字。 因为之后仍可能有解码语句,接下来会有1字节字母P或F作为语句间的分隔符,P代表本批次仍有解码的语句,F代表本批次完成。 第3.接下来1字节的字母有5种B/C/I/U/D,...步字母为C时: 【该部分为可选项】接下来1字节字母如果为X,则代表后面的8字节uint64表示xid。 【该部分为可选项】接下来的1字节字母如果为T,则代表后面4字节uint32表示时间戳长度,再后面等同于该长度的字符为时间戳字符串。 因为批量发送日志时,一个COMMIT日志解码之后可能仍有其他事务的解码结果,接下来的1字节字母如果为P则表示该批次仍需解码,如果为F则表示该批次解码结束。 第3.接下来1字节的字母有5种B/C/I/U/D,...步字母为I/U/D时: 接下来的2字节uint16代表schema名的长度。 按照上述长度读取schema名。 接下来的2字节uint16代表table名的长度。 按照上述长度读取table名。 【该部分为可选项】接下来1字符字母如果为N代表为新元组,如果为O代表为旧元组,这里先发送新元组。 接下来的2字节uint16代表该元组需要解码的列数,记为attrnum。 以下流程重复attrnum次。 接下来2字节uint16代表列名的长度。 按照上述长度读取列名。 接下来4字节uint32代表当前列类型的Oid。 接下来4字节uint32代表当前列的值(以字符串格式存储)的长度,如果为0xFFFFFFFF则表示NULL,如果为0则表示长度为0的字符串。 按照上述长度读取列值。 因为之后仍可能有解码语句,接下来的1字节字母如果为P则表示该批次仍需解码,如果为F则表示该批次解码结束。 sending-batch: 指定是否批量发送。 取值范围:0或1的int型,默认值为0。 0:设为0时,表示逐条发送解码结果。 1:设为1时,表示解码结果累积到达1MB则批量发送解码结果。 开启批量发送的场景中,当解码格式为'j'或't'时,在原来的每条解码语句之前会附加一个uint32类型,表示本条解码结果长度(长度不包含当前的uint32类型),以及一个uint64类型,表示当前解码结果对应的lsn。 parallel-queue-size: 指定并行逻辑解码线程间进行交互的队列长度。 取值范围:2~1024的int型,且必须为2的整数幂,默认值为128。 队列长度和解码过程的内存使用量正相关。
  • 通用选项(串行解码和并行解码均可配置,但可能无效,请参考相关选项详细说明) include-xids: 解码出的data列是否包含xid信息。 取值范围:0或1,默认值为1。 0:设为0时,解码出的data列不包含xid信息。 1:设为1时,解码出的data列包含xid信息。 skip-empty-xacts: 解码时是否忽略空事务信息。 取值范围:0或1,默认值为0。 0:设为0时,解码时不忽略空事务信息。 1:设为1时,解码时会忽略空事务信息。 include-timestamp: 解码信息是否包含commit时间戳。 取值范围:0或1,默认值为0。 0:设为0时,解码信息不包含commit时间戳。 1:设为1时,解码信息包含commit时间戳。 only-local: 是否仅解码本地日志。 取值范围:0或1,默认值为1。 0:设为0时,解码非本地日志和本地日志。 1:设为1时,仅解码本地日志。 white-table-list: 白名单参数,包含需要进行解码的schema和表名。 取值范围:包含白名单中表名的字符串,不同的表以','为分隔符进行隔离;使用'*'来模糊匹配所有情况;schema名和表名间以'.'分隔,不允许存在任意空白符。例如: select * from pg_logical_slot_peek_changes('slot1', NULL, 4096, 'white-table-list', 'public.t1,public.t2,*.t3,my_schema.*'); max-txn-in-memory: 内存管控参数,单位为MB,单个事务占用内存大于该值即进行落盘。 取值范围:0~100的整型,默认值为0,即不开启此种管控。 max-reorderbuffer-in-memory 内存管控参数,单位为GB,拼接-发送线程中正在拼接的事务总内存(包含缓存)大于该值则对当前解码事务进行落盘。 取值范围:0~100的整型,默认值为0,即不开启此种管控。 include-user: 事务的BEGIN逻辑日志是否输出事务的用户名。事务的用户名特指授权用户——执行事务对应会话的登录用户,它在事务的整个执行过程中不会发生变化。 取值范围:0或1,默认值为0。 0:设为0时,事物的BEGIN逻辑日志不输出事务的用户名。 1:设为1时,事物的BEGIN逻辑日志输出事务的用户名。 exclude-userids: 黑名单用户的OID参数。 取值范围:字符串类型,指定黑名单用户的OID,多个OID通过','分隔,不校验用户OID是否存在。 exclude-users: 黑名单用户的名称列表。 取值范围:字符串类型,指定黑名单用户名,通过','分隔,不校验用户名是否存在。 dynamic-resolution: 是否动态解析黑名单用户名。 取值范围:0或1,默认值为1。 0:设为0时,当解码观测到黑名单exclude-users中用户不存在时将会报错并退出逻辑解码。 1:设为1时,当解码观测到黑名单exclude-users中用户不存在时继续解码。 standby-connection: 仅流式解码设置,是否仅限制备机解码。 取值范围:bool型,默认值为false。 true:设为true时,仅允许连接备机解码,连接主机解码时会报错退出。 false:设为false时,不做限制,允许连接主机或备机解码。 sender-timeout: 仅流式解码设置,内核与客户端的心跳超时阈值。当该时间段内没有收到客户端任何消息时,逻辑解码将主动停止,并断开和客户端的连接。单位为毫秒(ms)。 取值范围:0~2147483647的int型,默认值取决于GUC参数logical_sender_timeout的配置值。 parallel-decode-num: 仅流式解码设置有效,并行解码的Decoder线程数量;系统函数调用场景下此选项无效,仅校验取值范围。 取值范围:取1表示按照原有的串行逻辑进行解码,取其余值表示开启并行解码,默认值为1。 当parallel-decode-num不配置(即为默认值1)或显式配置为1时,下述“并行解码”中的选项不可配置。
  • 串行解码 force-binary: 是否以二进制格式输出解码结果,针对不同场景呈现不同行为。 针对系统函数pg_logical_slot_get_binary_changes和pg_logical_slot_peek_binary_changes: 取值范围:bool型,默认值为false。此值无实际意义,均以二进制格式输出解码结果。 针对系统函数pg_logical_slot_get_changes、pg_logical_slot_peek_changes和pg_logical_get_area_changes: 取值范围:仅取false值的bool型。以文本格式输出解码结果。 针对流式解码: 取值范围:bool型,默认值为false。此值无实际意义,均以文本格式输出解码结果。
  • 注意事项 逻辑解码不支持DDL。 在执行特定的DDL语句(如普通表truncate或分区表exchange)时,可能造成解码数据丢失。 不支持数据页复制的DML解码。 当执行DDL语句(如alter table)后,该DDL语句前尚未解码的物理日志可能会丢失。 单条元组大小不超过1GB,考虑解码结果可能大于插入数据,因此建议单条元组大小不超过500MB。 GaussDB支持解码的数据类型为:INTEGER、BIGINT、SMALLINT、TINYINT、SERIAL、SMALLSERIAL、BIGSERIAL、FLOAT、DOUBLE PRECISION、DATE、TIME[WITHOUT TIME ZONE]、TIMESTAMP[WITHOUT TIME ZONE]、CHAR(n)、VARCHAR(n)、TEXT。 逻辑复制槽名称必须小于64个字符,仅支持小写字母、数字以及_?-.字符,且不支持“.”或“..”单独作为复制槽名称。 当逻辑复制槽所在数据库被删除后,这些复制槽变为不可用状态,需要用户手动删除。 对多库的解码需要分别在库内创建流复制槽并开始解码,每个库的解码都需要单独扫一遍日志。 不支持强切,强切后需要重新全量导出数据。 如需进行备机解码,需在对应主机上设置guc参数enable_slot_log = on。 备机解码时,switchover和failover时可能出现解码数据变多,需用户手动过滤。Quorum协议下,switchover和failover选择升主的备机,需要与当前主机日志同步。 不允许主备,多个备机同时使用同一个复制槽解码,否则会产生数据不一致。 只支持主机创建删除复制槽。 数据库故障重启或逻辑复制进程重启后,解码数据可能存在重复,用户需自己过滤。 计算机内核故障后,解码可能存在乱码,需手动或自动过滤。 当前备机逻辑解码,不支持开启极致RTO。 请确保在创建逻辑复制槽过程中长事务未启动,启动长事务会阻塞逻辑复制槽的创建。 不支持interval partition表复制。 不支持全局临时表的DML解码。 在事务中执行DDL语句后,该DDL语句与之后的语句不会被解码。 禁止在使用逻辑复制槽时在其他节点对该复制槽进行操作,删除复制槽的操作需在该复制槽停止解码后执行。 为解析某个astore表的UPDATE和DELETE语句,需为此表配置REPLICA IDENITY属性,在此表无主键时需要配置为FULL。 禁止在使用逻辑复制槽时在其他节点对该复制槽进行操作,删除复制槽的操作需在该复制槽停止解码后执行。 基于目标库可能需要源库的系统状态信息考虑,逻辑解码仅自动过滤模式'pg_catalog'和'pg_toast'下OID小于16384的系统表的逻辑日志。若目标库不需要复制其他相关系统表的内容,逻辑日志回放过程中需要对相关系统表进行过滤。 在开启逻辑复制的场景下,如需创建包含系统列的主键索引,必须将该表的REPLICA IDENTITY属性设置为FULL或是使用USING INDEX指定不包含系统列的、唯一的、非局部的、不可延迟的、仅包括标记为NOT NULL的列的索引。 在逻辑复制槽使用完毕后,需及时删除,否则会阻塞xLog日志回收。 若一个事务的子事务过多导致落盘文件过多,退出解码时需执行SQL函数pg_terminate_backend(逻辑解码的walsender线程id)来手动停止解码,而且退出时延增加约为1分钟/30万个子事务。因此在开启逻辑解码时,若一个事务的子事务数量达到5万时,会打印一条WARNING日志。 当同一事务产生大量需要落盘的子事务时,同时打开的文件句柄可能会超限,需将GUC参数max_files_per_process配置成大于子事务数量上限的两倍。
  • SQL函数解码性能 在Benchmarksql-5.0的100warehouse场景下,采用pg_logical_slot_get_changes时: 单次解码数据量4K行(对应约5MB~10MB日志),解码性能0.3MB/s~0.5 MB/s。 单次解码数据量32K行(对应约40MB~80MB日志),解码性能3MB/s~5MB/s。 单次解码数据量256K行(对应约320MB~640MB日志),解码性能3MB/s~5MB/s。 单次解码数据量再增大,解码性能无明显提升。 如果采用pg_logical_slot_peek_changes + pg_replication_slot_advance方式,解码性能相比采用pg_logical_slot_get_changes时要下降30%~50%。
  • 逻辑解码 GaussDB对数据复制能力的支持情况为: 支持通过数据迁移工具定期向异构数据库(如A数据库等)进行数据同步,不具备实时数据复制能力。不足以支撑与异构数据库间并网运行实时数据同步的诉求。 GaussDB提供了逻辑解码功能,通过反解xLog的方式生成逻辑日志。目标数据库解析逻辑日志以实时进行数据复制。具体如图1所示。逻辑复制降低了对目标数据库的形态限制,支持异构数据库、同构异形数据库对数据的同步,支持目标库进行数据同步期间的数据可读写,数据同步时延低。 图1 逻辑复制 逻辑复制由两部分组成:逻辑解码和数据复制。逻辑解码会输出以事务为单位组织的逻辑日志。业务或数据库中间件将会对逻辑日志进行解析并最终实现数据复制。GaussDB当前只提供逻辑解码功能,因此本章节只涉及逻辑解码的说明。 逻辑解码概述 逻辑解码选项 使用SQL函数接口进行逻辑解码 使用逻辑复制工具复制数据 父主题: 逻辑复制
  • DBE_SQL_UTIL.show_sql_patch show_sql_patch是用于显示给定patch_name对应的SQL PATCH的接口函数,返回运行结果。 限制仅初始用户、sysadmin、opradmin、monadmin用户有权限调用。 表1 DBE_SQL_UTIL.show_sql_patch入参和返回值列表 参数 类型 描述 patch_name IN name PATCH名称。 unique_sql_id OUT bigint 查询全局唯一ID。 enabled OUT bool PATCH是否生效。 abort OUT bool 是否是AbortHint。 hint_str OUT text Hint文本。 父主题: DBE_SQL_UTIL Schema
  • DBE_SQL_UTIL.disable_sql_patch disable_sql_patch是用于禁用SQL PATCH的接口函数,返回执行是否成功。 限制仅初始用户、sysadmin、opradmin、monadmin用户有权限调用。 表1 DBE_SQL_UTIL.disable_sql_patch入参和返回值列表 参数 类型 描述 patch_name IN name PATCH名称。 result OUT bool 执行是否成功。 父主题: DBE_SQL_UTIL Schema
共100000条